@ankit: agree with ankit......hash table or O(n^2) if no extra space --
Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Fri, Aug 5, 2011 at 1:39 AM, ankit sambyal <ankitsamb...@gmail.com>wrote: > If no extra memory is allowed, then I think we can't do better than O(n^2), > which is pretty straight forward. > > -- > 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.