[問題]請教各位大大~~~

看板TransCSI作者 (我的未來不是夢)時間20年前 (2005/06/24 11:03), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
請教一下大家~~ 題目如下: 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

140.121.213.170 06/24, , 1F
binary search?
140.121.213.170 06/24, 1F

140.115.201.20 06/24, , 2F
的確蠻像二元搜尋法
140.115.201.20 06/24, 2F
文章代碼(AID): #12ktVjVE (TransCSI)