yeah...only if given array is sorted ..we can do it in O(n) and O(1) fetch with all given restriction
On Wed, Feb 15, 2012 at 10:14 AM, Kartik Sachan <kartik.sac...@gmail.com>wrote: > @atul if array is not sorted we have to take extra array for > this...otherwise this cannn't be done in O(n) time. > > -- > 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.