Ad
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Hi @AntonRatnick, please check my fork as I did a few corrections:

    • The description has to be language independent, that's why I went back to array & integers since that's the most language independent variant.
    • Also added a few more sample cases (which I copied from other languages),
    • Then I copied those sample test cases into the main test cases, as they should be run not only in the sample section.
    • After that I added local to the variables inside the function since variables in Lua are global by default, and in general we should try to avoid global variables as much as possible.
    • Finally I did merged back the last version of the description so that it can be approved without conflicts.
  • Custom User Avatar

    Since the description is shared for all the languages, I went back to "array" and "integers" as it's the most language independent description.

  • Custom User Avatar

    ok! next question: why I am so stupid?

    Thanks =)

  • Custom User Avatar

    Because your code doesn't work with negative odd numbers?

  • Custom User Avatar

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