Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
What is the bug? Your solution seems to be buggy, it does not handle leading spaces correctly.
It seems there's a bug in this, but its not reading the correct answer as passed in Java.
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
there was a spurious line in the initial code that would cause out-of-bounds accesses if not deleted. removed.
im so stupid i read it like reverese the entire string ie "Double spaces" to ""secaps elbouD" lololoolooololoooooooooolollololoolololo
Fixed.
Approved.
This was a fun problem. I am going to attempt the harder problem I saw that had a similar concept to this now.
Not a valid suggestion.
Please do not post solutions in kata discourses.
This comment is hidden because it contains spoiler information about the solution
I understood
And why did you use
trim
?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]>
I started to unify test cases and random input generation to have the following specs:
Languages checked/updated so far: C, C++, C#, Dart, Haskell, Java, JavaScript, PHP, Python, TypeScript
Not a kata issue. Your code is just reversing the
text
, and not reversing each word intext
. Note thatword
is composed of any non-space characters.Loading more items...