1: use bit array(hashing) then only it is possible in O(n) On Fri, Sep 16, 2011 at 12:04 PM, tech coder <techcoderonw...@gmail.com>wrote:
> @ akshat read the question properly before posting such solution > > > On Wed, Aug 31, 2011 at 12:27 PM, Akshat Sapra <sapraaks...@gmail.com>wrote: > >> Solution: >> >> arr[n],sum = 0; >> >> >> for ( int i = 0 ; i < n; i++ ) { >> sum ^= arr[i]; >> } >> >> print sum; // required number >> >> -- >> >> >> Akshat Sapra >> Under Graduation(B.Tech) >> IIIT-Allahabad(Amethi Campus) >> -------------------------------------- >> sapraaks...@gmail.com >> akshatsapr...@gmail.com >> rit2009...@iiita.ac.in >> sapraaks...@facebook.com >> >> -- >> 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. >> > > > > -- > * > > Regards* > *"The Coder"* > > *"Life is a Game. The more u play, the more u win, the more u win , the > more successfully u play"* > > -- * Regards* *"The Coder"* *"Life is a Game. The more u play, the more u win, the more u win , the more successfully u play"* -- 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.