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.
Just added a rule in the description to avoid this misunderstanding when speed is
0
Hello, thank you very much for your feedback. However, I'd like to clarify a couple of points based on the exercise rules:
Speed of 0: As mentioned in the description, "If the speed is zero, the taxi cannot make trips and will not be considered for assignments." Therefore, taxis with a speed of 0 are excluded from any trip calculations.
Empty list of speeds: Similarly, if there are no taxis available (i.e., the list of speeds is empty), no trips can be completed. The program must check this condition first, as described by the rule: "There is a possibility that no one of the distances could get completed by any taxi."
Also there is already one sample test for this case: "Test 4: distances = [120], speeds = []"
I hope this clarifies the logic behind the tests.
Fixed
You are rigth, I already fixed it and updated the kata. Thanks you!
Nice kata!
Java Translation