Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Description:

    ... Any whitespace at the end of the line should also be stripped out.

    \t is a whitespace character. Therefore, it should also be removed when it's in the end of the line. The line here is the result of removing the comment. This has also been demonstrated in the kata description. The space after apples, pears is removed, even though there's a comment after it.

    Not a kata issue.

  • Custom User Avatar

    Log

    String: '\t. !\navocados avocados = strawberries #\npears watermelons'

    Markers: ['!', '#', '@', "'", ',', '.', '^']

    '\t\navocados avocados = strawberries\npears watermelons'

    should equal

    '\navocados avocados = strawberries\npears watermelons'

    This asseration is incorrect. The marker . in the input string clearly comes after the \t character and therefore \t should be included in the output string.

    Edit: removing \t's right before a marker fixed it even though that doesn't make sense

  • Custom User Avatar

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

  • Custom User Avatar

    This code crashed my code editor for large n.
    Appending to a list, then summing, requires all entries to be saved in memory.
    This causes a memory overflow crash for very large n.