結果 : o log n time complexity algorithm