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.
Not sure why the random tests are failing for some people, I will look into it.
As per the other folks here, random tests are failing (in Ruby) even though correct results have been confirmed in other repl's.
Just looks pretty bad that this kata was one of those advertised on the Weekly Codewars Challenges email.
Excellent, thank you for the feedback. I had thought those test cases were the same as in the example. Thanks for taking the time to look into this for me. I'll definitely up rate this kata, I've really enjoyed it.
I also added value ranges for
x
andy
to the description to hint that such cases may happen.I have added "4/-6" and "10/-7" to example test cases.
I haven't tested this yet, but it looks like your code is problematic in this fragment:
This looks like bad logic. In case of positive dividend and negative divisor it will not add a minus while it should. Which is exactly the case with those two test cases - "4/-6" and "10/-7".
This comment is hidden because it contains spoiler information about the solution