>>sorry i forgot to mentioned
>>that array may or may not have a majority element.
If the array may or may not contain the majority element, then after
the last step(ie once you get the get the array with one element) ,
just iterate thru the original array once counting the number of
occurences of this element.
Then you 'll know whether its the majority element or no such element exists.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
- [algogeeks] Re: find the most occured (more than N/2 ... Amit Banwari
- [algogeeks] Re: find the most occured (more than... Praveen
- [algogeeks] Re: find the most occured (more ... Karthik Singaram L
- [algogeeks] Re: find the most occured (m... Praveen
- [algogeeks] Re: find the most occure... Vinodh Kumar
- [algogeeks] Re: find the most o... Praveen
- [algogeeks] Re: find the mo... Arunachalam
- [algogeeks] Re: find the mo... Praveen
- [algogeeks] Re: find the mo... Vinodh Kumar
- [algogeeks] Re: find the mo... Dhyanesh
- [algogeeks] Re: find the mo... Siva
- [algogeeks] Re: find the mo... subrahmanyam kambala
- [algogeeks] Re: find the mo... Googmeister
- [algogeeks] Re: find the mo... Vishal
- [algogeeks] Re: find the most occured (m... Googmeister
- [algogeeks] Re: find the most occure... Guillaume CL
- [algogeeks] Re: find the most o... Googmeister
