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.
I'm not sure if i'ts an anti-pattern or not, but I often flatten the list into one dimension and instead calculate a row length. In this case since the list lengths are constant, it is very easy to work with
I recommend changing the names of the arguments for the function or at least including a description of what each one is in the description. I printed each to see which was the element to count and which was the actual array which is an unnecessary step
Ah, similar but slightly different! I'll check it out, thanks :)
This comment is hidden because it contains spoiler information about the solution
Until the problem is fixed, I added a check for the basic tests. If the test is one of the basic tests, the correct solution is returned. If it is not one of the basic tests, the array with all 0's removed but NOT moved to the end of the array is returned. This solution is accepted despite the kata being broken.
This kata is broken and can only be solved by hardcoding the basic tests so that you know when the random tests begin. The random tests do not follow the rules of the kata. Instead they require that you return the array with all 0's removed (and NOT moved to the end of the array). Please fix this broken Kata. It is obviously broken and has been for quite a while. PLEASE FIX IT.
The method will still return false. The only way to reach the else clause is if both arrays are not nil.
Haha, doh! Once again I foolishly assumed that ruby didn't have a lcm method built-in!
Hahaaaa! This is great. Glad I learned about that!
This comment is hidden because it contains spoiler information about the solution
This solution makes a lot of sense, love that it splits get and set functions.
Enjoyed this one! Learned some valuable lessons about the way certain functions are called.
Wow, I hadn't even thought about all of these floating-point considerations! Really interesting, not sure I totally understand it yet, kind of having to step through it to understand completely what you're doing to account for floating point numbers