Given a list of n numbers in which all but one repeat exactly k times, but the remaining one appears less than k times (and at least once).
Find this number (which repeats less than k times).
Expected Complexity
Time ≤ O(nlgk)
Memory ≤ O(lgk)
How to find the odd element (generalized version) in the list?
Given a list of n numbers in which all but one repeat exactly k times, but the remaining one appears less than k times (and at least once).
Find this number (which repeats less than k times).
Expected Complexity
Time ≤ O(nlgk)
Memory ≤ O(lgk)