|
-
February 10th, 2010, 04:56 AM
#1
plz can ny1 help me plz urgent
Suppose that you are given a sorted sequence of distinct integers {a1 , a2 , . . . , an }. Give
an O(lg n) algorithm to determine whether there exists an index i such at ai = i. For example, in
{−5, −3, 3, 5, 7}, a3 = 3. In {2, 3, 4, 6, 7} there is no such i.
plz can any1 tell me a proper algorthnm for this plz/././/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|