How to find the odd element (generalized version) in the list?

Правка en1, от -synx-, 2017-12-01 07:02:08

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)


  Rev. Язык Кто Когда Δ Комментарий
en1 Английский -synx- 2017-12-01 07:02:08 330 Initial revision (published)