we can make a binary search tree by inserting the elemnts of array... include a count =0 in the structure... for every duplicate value to be inserted count++ rather than inserting it... finally traverse the tree and return the value which has count=0... but i dnt think its O(n)
On Wed, Jun 16, 2010 at 8:21 PM, jalaj jaiswal <[email protected]>wrote: > @ rohit... any solution buddy ... other then using hashing > > > On Wed, Jun 16, 2010 at 9:04 AM, Rohit Saraf > <[email protected]>wrote: > >> Just to point out : >> how many times have you all repeated this -- >> "Xor works only ------------------ even number of times. It will not >> work..............." >> >> Why don't you all read some earlier posts before posting. :P >> >> >> -------------------------------------------------- >> Rohit Saraf >> Second Year Undergraduate, >> Dept. of Computer Science and Engineering >> IIT Bombay >> http://www.cse.iitb.ac.in/~rohitfeb14<http://www.cse.iitb.ac.in/%7Erohitfeb14> >> >> >> >> On Tue, Jun 15, 2010 at 4:52 PM, Krishan Malik <[email protected] >> > wrote: >> >>> Priyanka, >>> >>> will XOR work for >>> >>> {1,1,1,3,3,4,5} >>> >>> Thanks >>> Sri >>> >>> On Mon, Jun 14, 2010 at 7:02 PM, Priyanka Chatterjee >>> <[email protected]> wrote: >>> > >>> > XOR all the elements of array, the remaining value is the required >>> unique >>> > number. >>> > (XORing two same numbers results in zero) >>> >> >>> > >>> > >>> > >>> > -- >>> > Thanks & Regards, >>> > Priyanka Chatterjee >>> > Third Year Undergraduate Student, >>> > Computer Science & Engineering, >>> > National Institute Of Technology,Durgapur >>> > India >>> > http://priyanka-nit.blogspot.com/ >>> > >>> > -- >>> > 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]<algogeeks%[email protected]> >>> . >>> > For more options, visit this group at >>> > http://groups.google.com/group/algogeeks?hl=en. >>> > >>> >>> >>> >>> -- >>> SK Malik >>> >>> -- >>> 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]<algogeeks%[email protected]> >>> . >>> 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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<algogeeks%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > With Regards, > Jalaj Jaiswal > +919026283397 > B.TECH IT > IIIT ALLAHABAD > -- With Regards, Jalaj Jaiswal +919026283397 B.TECH IT IIIT ALLAHABAD -- 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.
