Solution to Odd-Occurrences-In-Array by codility

18 Sep


Question Name: Odd-Occurrences-In-Array or OddOccurrencesInArray

This question is completely the same as the Perm-Missing-Elem by codility. The comment from Kim is very helpful.

22 thoughts on “Solution to Odd-Occurrences-In-Array by codility

  1. JavaScript solution
    Why I am getting only 11% for correctness?

    • When you are using “for (var number in A)”, you are actually getting the indexes, such as [0, 1, 2, …], rather than the array elements.

  2. My Java solution (100%)

  3. I’m quite new to programming but here’s my python solution. I didn’t realise I could have used XOR.

    • Welcome to the coding world 🙂

      Your solution is working. That’s great! And the major improvement space is, it’s abusing the exception mechanism.

  4. Mi Javascript Solution 100%

  5. My very simple Java solution (100%).

  6. This is my solution in python

    I got a 100% score

Leave a Reply

Your email address will not be published. Required fields are marked *