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.
That's some trolling indeed
Smart way to do recursive function in R, thanks a lot.
It's a great feature of R ;)
Love the check for zero using conversion to logical!
Yeah that's very confusing.
beautiful work
Why do people for this as best practice?
You can already see that in the example in the description.
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.
If
a
orb
does not exist in the arr, we can't do-
on nil.This is a clever solution, but does not deal with edge cases.
Thanks a lot!
That solved my issue.
bad test design, but bad practice on your side too: you're modifying the input arrays. => make copies of them
python: the user can modify the inputs (see just below / I guess it will be the same in other languages)
Loading more items...