看板 TransCSI 關於我們 聯絡資訊
請教一下大家~~ 題目如下: Let A[n] be an array with n element sorted in asccnding order. It is simple to construct an O(log n) algorithm to find the position k in A[n] for a given value v. Assume that k is much less than n (i.e. k<<n) Write an O(log k) time algorithm to search for v. (Note:You do not know the value of k in advance, only v is known.) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.131.230.94
hicoy:binary search?140.121.213.170 06/24
deepdish:的確蠻像二元搜尋法 140.115.201.20 06/24