Binary search的時間複雜度為O(log(n)),也就是要從n個元素中搜尋到某一個元素,則最多要搜尋log(n)次。 下面範例為利用binary search從一個整數陣列 ...
確定! 回上一頁