My previous email got sent accidentally.. 

Assume if we have 90 elements and need to find 30 elements that are 
repeating..as per Sanjay's algo,divide it to 45 elements.. To find majority in 
45 elements, the number should repeat >=  23 times.. This might not be valid 
since the number could repeat only 15 times if it's distributed uniformly 
across two sub arrays..

Let me know if am wrong..

Thanks,
Balaji

Apologies for brevity and spelling.

On Jul 2, 2012, at 11:47 PM, Balaji Subramanian <balaji.subraman...@gmail.com> 
wrote:

> Seems to be a nice algorithm. But won't think it would work..Majority number 
> element should repeat for more than n/2 times.. 
> 
> Apologies for brevity and spelling.
> 
> On Jul 2, 2012, at 1:46 PM, sanjay pandey <sanjaypandey...@gmail.com> wrote:
> 
>> i think the concept of majority elemnt can be applied here .....
>> 1.divide array into 2 halves
>> 2.apply majority in each
>> 3.den from d two majority found do linear counts of dere frequency??
>> 
>> 
>> -- 
>> 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.

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

Reply via email to