Is the array sorted? In A[1..n], one number is missing from 0 to N. So, A[5]={--INF, 2,1,3,0} is a valid case?
On Wed, Jun 22, 2011 at 11:51 PM, RollBack <rajeevr...@gmail.com> wrote: > An array A[1...n] contains all the integers from 0 to n except for one > number which is > missing. In this problem, we cannot access an entire integer in A with > a single opera- > tion. The elements of A are represented in binary, and the only > operation we can use > to access them is “fetch the jth bit of A[i]”, which takes constant > time. Write code to > find the missing integer. Can you do it in O(n) time? > _ > _ _____________________________________________ > > Rajeev N Bharshetty > I Blog @ www.opensourcemania.co.cc > > -- > 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. > > -- 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.