結果 : string substring java time complexity