[問題]請教各位大大~~~
請教一下大家~~
題目如下:
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
140.121.213.170 06/24, 1F
推
140.115.201.20 06/24, , 2F
140.115.201.20 06/24, 2F