結果 : substring search time complexity