Hint: check the middle of array if a[middle]>middle dont need to check again after middle
Now you can solve this. On Sat, Dec 4, 2010 at 3:53 PM, bittu <[email protected]> wrote: > find out all the elements in a sorted integer array whose value is > equal to index of the array. O(logn) solution is expected. > > > > > Regards > Shashank > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- -- Atul -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
