Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    In this example:

    • 1 appears 10 times, and 10 is even
    • 10 appears 1 time, and 1 is odd

    10 appears odd amount of times, so it's the answer.

    About assertions, it depends on the language you are attempting. For some, like Java or C#, these are standard unit test libraries, like NUnit or JUnit, you just add reference to your project and you are good to go. For others, like Python, getting the test framework to work locally is a real PITA.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution