Q1->Construct a binary tree , in such a way that if element occured for the
first time , insert into tree , if occurs at second time , remove from the
list.
As all elements except the one need to find are even , at the end of the
list , all the tree will contain only one element.

Q2-> Construct a binary tree. similar to the above.
Now again start from first element and check which element is missing in the
tree. That is the required one.


Thx,
--Gopi

On Sun, Jul 31, 2011 at 2:07 PM, Abhishek Gupta <[email protected]>wrote:

> Q1-> A large size array is given. All except one element are repeated even
> no. of times and one element is repeated odd no. of times. Find that
> element. Don't use X-OR
>
> Ans -> Is there any efficient way of finding it without using sorting or
> removing duplicates or using hash tables??
>
>
>
> Q2-> Same qn is like all except one are repeated off no. of times and one
> element repeated even no. of times. find that element. (no specification for
> X-OR use given)
>
> Ans-> Again, I tried it using hash table.
>
>
> --
> Abhishek Gupta
> MCA
> NIT Calicut
> Kerela
>
>  --
> 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.
>



-- 
Thx,
--Gopi

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

Reply via email to