Ad
  • Custom User Avatar

    What is the bug? Your solution seems to be buggy, it does not handle leading spaces correctly.

  • Custom User Avatar

    It seems there's a bug in this, but its not reading the correct answer as passed in Java.

  • Custom User Avatar

    For anyone who is hopelessly stuck:
    To find the solution in Python (without guessing randomly),
    you rely on importing a library that you may have never heard of.

    So I recommend searching the web if there are any tools that make your life easier.
    I hope this info can avoid some frustration, please do not flag a spoiler

  • Custom User Avatar

    there was a spurious line in the initial code that would cause out-of-bounds accesses if not deleted. removed.

  • Custom User Avatar

    im so stupid i read it like reverese the entire string ie "Double spaces" to ""secaps elbouD" lololoolooololoooooooooolollololoolololo

  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    Approved.

  • Custom User Avatar

    This was a fun problem. I am going to attempt the harder problem I saw that had a similar concept to this now.

  • Custom User Avatar

    Not a valid suggestion.
    Please do not post solutions in kata discourses.

  • Custom User Avatar

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

  • Custom User Avatar

    I understood

  • Custom User Avatar

    And why did you use trim?

  • Custom User Avatar

    Hey! Guys i need a tip what to do with this problem. I've alraedy used trim.
    Input: " double spaced words " ==> expected: <[ elbuod decaps sdrow ]>
    but was <[elboud decaps sdrow]>

  • Custom User Avatar

    I started to unify test cases and random input generation to have the following specs:

    • ASCII only
    • multiple spaces
    • possible leading and trailing spaces

    Languages checked/updated so far: C, C++, C#, Dart, Haskell, Java, JavaScript, PHP, Python, TypeScript

  • Custom User Avatar

    Not a kata issue. Your code is just reversing the text, and not reversing each word in text. Note that word is composed of any non-space characters.

  • Loading more items...