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.
New to ruby, is that forbidden? Weird that it makes the random tests fail but not the others.
Ruby random tests verification uses the same value for target and start. But the function is fed different values (Same issue reported by @sergeyn 3 years ago).
Rand test 1
start = [7, 7]
target = [0, 5]
wrong route from [0, 5] to [0, 5] - Expected: [[0, 5]], instead got: [[7, 7], [6, 6], [5, 5], [4, 5], [3, 5], [2, 5], [1, 5], [0, 5]]
Is this while loop really "Best Practices"? Made me scratch my head for a while.
Thanks that worked! It seems my solution was just a little bit too slow with 10 long string random tests total.
What's weird is that I now see many solutions using array methods. I tried the first two higest rated ones and they time out too.
I guess the server was a bit slower today.
This comment is hidden because it contains spoiler information about the solution
Haha ok FML if this was deemed too easy :'(
This kata seems very interesting and quite different from other, however...
I just became 5kyu. While I could do dozens of 6kyu katas in a couple hours max each, this one leaves me confused. I see 2 ways to approach this problem :
Regexp, but the nested stuff seems a nightmare to deal with. Is it even possible for a normal human being? I knew a guy who could use regexps with almost everything but he was a bit weird. ;)
Build a parser from scratch. I read an article about it and it seems pretty complex. I guess I would need a full week to understand what to do and implement it. But writing a full program at 5kyu? I just solved a couple other 5kyus katas in 10 lines max...
Am I missing something and it's actually not that complicated, or the difficulty is way off?
7000 is MMMMMMM in the tests, it breaks the rule "Remember that there can't be more than 3 identical symbols in a row."
According to various wikis, 7000 should be written VMM (V with an overline).
Test cases are flawed for numbers between 5000 to 9999 and need a workaround to make them work.
Either they should be 4999 max, either symbols for 5000 and 10000 should be given (apparently it's a V and X with an overline or vinculum).