i think what aditya suggested is cool but in that instead of going for
largest element we need to search smallest value and its index would he
number we are looking for.

On Sun, Feb 24, 2013 at 7:45 PM, Dave <dave_and_da...@juno.com> wrote:

> @Marti: If you know m and k, and if m is even and k is odd, then xoring
> the elements of the array will give the integer that occurs k times. But
> this is not a general algorithm for arbitrary m and k.
>
> Dave
>
> On Sunday, February 24, 2013 1:24:23 AM UTC-6, marti wrote:
>
>> A hint is to use XOR for linear time..but how?
>>
>> On Friday, February 22, 2013 12:58:07 AM UTC+5:30, marti wrote:
>>>
>>> How do I Find the Unique Element that Appears exactly k Times in an
>>> Array?
>>>  the problem is given an integer array, only one integer appears* k* times,
>>> all the other integers appears *m* times in the array (*k*<*m*). Find
>>> out that integer.
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to