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.
Missing edge cases where both time and distance are negative (
getTrain(3,2,3,1)
), and only distance is negative (getTrain(3,2,2,1)
).The description is very unclear.
And as mentioned below, there are obvious input constraints that isn't mentioned by the kata.
Needs random tests.
This comment is hidden because it contains spoiler information about the solution
Take into consideration making some random tests (take a look at my solution) :)