Plz write the code here.

On Sun, Aug 23, 2009 at 2:30 PM, Dufus<[email protected]> wrote:
>
> Idea is simple either to keep a count and emit elements with odd count
> (frequency) or XOR element with itself for each time it occurs in
> input and then emit elements which have non zero XORed result(which
> basically corresponds to elements with odd frequency).
>
> _dufus
>
>
> On Aug 23, 8:44 am, Nagendra Kumar <[email protected]> wrote:
>> How are u doing with xor. Can u post ur thought here.
>>
>> Thanks
>> Nagendra
>>
>>
>>
>> On Sun, Aug 23, 2009 at 2:07 AM, Dufus<[email protected]> wrote:
>>
>> > We can count or XOR but I couldnt find any advantage of XORing except
>> > for preventing overflow.
>>
>> > _dufus
>>
>> > On Aug 22, 5:03 pm, Nagendra Kumar <[email protected]> wrote:
>> >> I think you are trying sorting and then counting the frequency of the 
>> >> numbers.
>>
>> >> -Thanks
>> >> Nagendra
>>
>> >> On Sat, Aug 22, 2009 at 11:21 AM, Dufus<[email protected]> wrote:
>>
>> >> > I can think of a naive algorithm which takes O(n) time and O(n) space.
>> >> > or O(nlogn) with O(1) space.
>>
>> >> > May be someone else might come up with a better algo.
>>
>> >> > _dufus
>>
>> >> > On Aug 21, 3:01 pm, nagendra kumar <[email protected]> wrote:
>> >> >> Given an array of integers,Print the integers whose appareance are in
>> >> >> odd times.
>> >> >> Need not worry abt order while printing the output.
>> >> >> Need Algotithm in o(n) time complexity.
>> >> >> Need efficient space complexity.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to