Ad
  • Custom User Avatar

    For 4 kyu it is too easy, because even not very smart I was able to do it by writing my terrible code. (that's my first 4kyu, others are much more difficult)

  • Custom User Avatar

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

  • Custom User Avatar

    How can we know if the problem can be fixed if you don't know what you're doing?

  • 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

    I'm using the .keys() and .values() functions, idk if it's correct but it keeps giving me an attribute error. Is there a way to fix this?

  • Custom User Avatar

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