@rohit: For any given hash function , a worst case input can be designed to
make all the keys get hashed to the same bucket [ hence counting the number
of occurrences of an element wud take O(n*n/2) [ in both seperate chaining
and Open addressing ).
@all: majority voting algorithm suggested by navin naidu is very effcient
and elegant.
http://userweb.cs.utexas.edu/~moore/best-ideas/mjrty/index.html
.

On Wed, Apr 14, 2010 at 10:20 PM, Rohit Saraf
<rohit.kumar.sa...@gmail.com>wrote:

> @rizwan : Think!!..... *my algorithm is worst case O(n)*..
> no doubt !
>
> --------------------------------------------------
> 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 Wed, Apr 14, 2010 at 10:01 PM, sharad kumar <aryansmit3...@gmail.com>wrote:
>
>> ya over here its >501 rite?????
>>
>>
>> On Wed, Apr 14, 2010 at 8:24 PM, Prakhar Jain <prakh...@gmail.com> wrote:
>>
>>> If m thinking right,
>>> That works if mode occurs >=n/2 times in the array
>>>
>>> Best,
>>> Prakhar Jain
>>> http://web.iiit.ac.in/~prakharjain/<http://web.iiit.ac.in/%7Eprakharjain/>
>>>
>>>
>>> On Wed, Apr 14, 2010 at 8:12 PM, sharad kumar 
>>> <aryansmit3...@gmail.com>wrote:
>>>
>>>> can we make use of majority VOTE ALGORITHM?
>>>>
>>>>
>>>> On Wed, Apr 14, 2010 at 4:14 PM, Gauri <gauri...@gmail.com> wrote:
>>>>
>>>>> Say If I have an array of 1,000 32-bit integers .And one of the value
>>>>> is occuring 501 number of times or more in the array. Can someone help
>>>>> me devise an efficient algorithm for the same ?
>>>>>
>>>>> Thanks & Regards
>>>>> Gauri
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Algorithm Geeks" group.
>>>>> To post to this group, send email to algoge...@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@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 algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Thanks and regards
Rizwan A Hudda
http://sites.google.com/site/rizwanhudda

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@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