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.
The best and understandable
What's wrong with my code?
This comment is hidden because it contains spoiler information about the solution
Does it?
This comment is hidden because it contains spoiler information about the solution
that is clever! thanks ^_^
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I don't understand how this code solve "double space" problem?
What if there are multiple gaps?
The solution doesn't retain spaces at the end of the string.
String given = "abcd ";
Time Complexity: O(n)
Space Complexity: O(n)
Great Job!
If N is the number of words in the original string. Then this version requires 3N+2 array allocations.
your solution can't pass this test:
assertEquals("elbuod decaps ta eht dne ", Kata.reverseWords("double spaced at the end "));
This comment is hidden because it contains spoiler information about the solution
Loading more items...