I guess O(1) extra space means constant extra space. In that case, you can have a hash map ( or a bool array) and then switch b/w true and false for every occurence. All of those which havent been switched twice , are the result.
On Sun, Aug 12, 2012 at 9:16 PM, g4ur4v <[email protected]> wrote: > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/La5cAv04gqQJ. > 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. > -- - - - - - - - - - - - - With Regards Daksh Talwar -- 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.
