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.
we are supposed to fix the code!!! NOT write a new one....
Which language?
Lol, this is what I get for doing C katas before going back to Ruby and forgetting how nice things are.
It'll return false, as it wouldn't be a valid tail:
make sure that the second argument (tail), is the same as the last letter of the first argument (body)
What if tail.length > 1?
I think that a better solution would be to add some more tests that would fail if you changed to text of the identifiers. Right now its more like guessing what output is wanted for the final submission.
This comment is hidden because it contains spoiler information about the solution
Bugger. Don't you hate when you have just 'high fived' yourself for an awesomely concise method then, boom!!
Yeah, you should probably add it. That was the info that was causing me problems.
That kata made no sense. There are several solutions which seem to work. The creator should be more clear about what they want. From comments, "without changing the text" should probably be added. Changing all of the data from both keys and values would seem to be a cheat.
As with some of the other katas, sometimes the tests need to be run a few times to show flaws in the code. It would be great to include randomly generated tests before submission.
Ahhhhh, thanks for the pointer. I had one failing test I couldn't pin down
There are not enough tests included with this. I got through with an algorithm I know was incorrect and got through to 7 kyu. I feel dirty :(
Oooh, I love this site. I'd been scratching my head as to why my script didn't work for the first and last test in Ruby. Just discovered something I didn't know about the results of small integers divided by larger integers in ruby. Seems to be a couple of ways to handle it. Also applies to Python 2 apparently.
Figured out it was about how integers are handled. Not sure if the tests were supposed to teach that in particular but definitely learned something. Nice Kata sensei :)
Loading more items...