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.
Hi) , accept " TrimeEnd() "; google in help
No, read the kata's description again:
The words keep their relative order, but they should be reversed as how they were originally.
You should return the reversed string, not the original one.
Your code is returning the same string as the input, that's why it fails.
Are you looking at what the input was? Otherwise you can't state that you've reversed them, not knowing the original order.
You're free to print out information about what's going on in your code. You can print out things like what the input to your method was, and what value your method returns. That way you can manually judge whether your method does what it's supposed to, and whether that agrees with the error report that you're getting.
It also doesn't matter whether the input is a reversed English word, or a word at all. The input can therefore never be "reversed to begin with" as nothing is supposed to be in any particular order in the input.
"not at all"
should obviously be0
, and therefore,"madly"
should have the highest value, as you correctly inferred. however, despite your astuteness, you made a miscalculation: being the6
th value of all the possibilities,"madly"
should be attributed the numeric value of five (5
), two less than you hypothesized