結果 : two pointer algorithm in java