作者Rakoto (我的未来不是梦)
看板TransCSI
标题[问题]请教各位大大~~~
时间Fri Jun 24 11:08:04 2005
请教一下大家~~
题目如下:
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
1F:推 hicoy:binary search?140.121.213.170 06/24
2F:推 deepdish:的确蛮像二元搜寻法 140.115.201.20 06/24