Do a binary Search between a[2**(k-1)] and a[2**(k)] just find kth element greater than the item to be searched.
On Mon, Oct 24, 2011 at 12:28 AM, sunny agrawal <[email protected]>wrote: > hint 1: try to find 2 indexes i, j such that a[i] <= K <= a[j] > > > On Sun, Oct 23, 2011 at 11:23 PM, Ankuj Gupta <[email protected]> wrote: > >> Given a sorted array of Infinite size, find an element âKâ in the >> array without using extra memory in O (lgn) time >> >> -- >> 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. >> >> > > > -- > Sunny Aggrawal > B.Tech. V year,CSI > Indian Institute Of Technology,Roorkee > > > -- > 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. > -- ATul Singh | Final Year | Computer Science & Engineering | NIT Jalandhar -- 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.
