@Everyone: The problem says that the array is of UNKNOWN length, but all of the solutions presented assume that the array is of INFINITE length. Suppose, e.g., that the length is 987, but you don't know that. Then it will be meaningless to probe at 1, 10, 100, 1000, etc, or 1, 2, 4, ..., 512, 1024 because any probe beyond 987 is outside the array. An address violation may occur, or arbitrary data, unrelated to the data in the array may be used. I think the problem as stated is unsolvable.
Dave On Aug 19, 12:48 pm, sagar pareek <sagarpar...@gmail.com> wrote: > HI, > > I have encountered a problem :- > > You have an array of *UNKNOWN *length . And you have to find an element > in O(log(n)) time without using any extra space. > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.