codility
codility copied to clipboard
odd number selection bug
Came upon this code through google search
https://github.com/karimhamdanali/codility/blob/6ddaf5e714feb48b051838379d7a659775450e19/src/codility/OddOccurrencesInArray.java#L41-L46
If the input array is arranged so that the odd number occurs before the pairs, the output will be the last number did not exist in the set, which may not necessarily be the odd number. for example, {7, 9, 3, 9, 3, 9, 9} will return 3