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.
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.i think there's a bug-
Ahhhh, I see. Makes sense, but definitely would not have resolved it without asking. Thank you!
You should look where in your code you add the space and why it is not added in the
"hello hello"
case.This comment is hidden because it contains spoiler information about the solution