Ad
  • Custom User Avatar

    13 itself is an odd number.

  • Default User Avatar

    Thank you so much for explaining this! Your comment is super helpful.

    However, the statement 'A positive integer can be represented as a sum of consecutive integers if and only if it is divisible by an odd number' is not always true:
    13 is a sum of consecutive integers (6+7) and is not divisible by an odd number (this seems to apply to any prime number > 2 if fact)

  • Default User Avatar

    cool solution except one caveat here:

    assertEquals("elppa ", Kata.reverseWords("apple "));

    => fails because trailing spaces are removed