Saturday, September 18, 2010

Find number which occur more than n/2 times in an array?

Find number which occur more than n/2 times in an array?
Find number which occur exactly n/2 times in an array?

o(n) time and o(1) space complexity.

No comments:

Post a Comment