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.
It's a great feature of R ;)
Yeah that's very confusing.
beautiful work
Why do people for this as best practice?
The description needs to address how to handle 0, that knowledge is obviously required to pass the tests.
Oh well.
You're right, but the kata description explicitly says "It is guaranteed that a and b are both present in arr", so for this specific task this does the trick.
Okay, apparently I totally misunderstood the description. Thanks for pointing it out for me, I get it now.
I don't understand the example "custom_fib([7,3,4,1],[1,1],6) == 2". From my understanding, the sequence is 7,3,4,1,8,2,16,4 etc, with the element at index 6 being 16, not 2. Where is my mistake?
You're right, I'm stupid :) I just got frustrated because I'd solved the wrong problem. Still, having '5 lions and 15 zebras' as one of the basic test cases would be nice (Ruby).
Agreed!
Neither the description nor the basic test cases clearly indicate that the random tests diverge from the simple 'number word' form and include longer strings with multiple things to replace (Ruby). I had to re-write my whole code because of this, please include at least one example with a longer string to make this more obvious right away.
This was way too easy for 5kyu, compared to other regex-kata it seems more like 7kyu to me.
In Ruby, I'm failing random tests like these:
pool: 20GGBBBBBRRRRRRWWUUUUUU spell: 7GBBBWRRR => Expected: false, instead got: true
pool: 20RRBBBBGGGWW spell: 5RR => Expected: false, instead got: true
I know how MTG mana works, and I'm passing all the fixed tests including the ones with multiple spells. I assume this is a bug, not a feature?
The description says: "Double "ER"s --->'ERER' and the letters 'ERH' should be replaced with just 'ER'"
So there shouldn't be any need to repeat the process, right?
Loading more items...