Find the Largest Element in the Array and create an array of that size. now scan the given array and increment the corresponding index of the new array search for the largest number in the new array and the corresponding index is the number that is repeated most number of times.
On Thursday, February 21, 2013 11:28:07 AM UTC-8, 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.