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.
In Python, if the user's solution modifies
traffic
, test cases break. In the tester code, pass a COPY of the list to the solution withtraffic[:]
to fix this.In the meantime, I managed to submit my solution by copying the traffic list like this:
t = traffic[:]
and using my copy to solve the problem.I know it sounds kinda stupid, but the sensei should mention that multiple cars can pass in one go, and that the order of the cars is important
Otherwise, this kata is quite a fun one to solve
All random tests expect an answer of one, even when the correct result is clearly way above one.
The user can modify the input.