codility icon indicating copy to clipboard operation
codility copied to clipboard

odd number selection bug

Open rayary opened this issue 8 years ago • 0 comments

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

rayary avatar Feb 28 '18 04:02 rayary