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.
There is a problem with this Kata. In particular some legal outputs (i.e. those where a car is sat at a traffic light) cannot be used as legal inputs, since you cannot tell whether a traffic light is being obscured. To handle iterations within the function you have to retain intermediate state for the position of the traffic lights that is separate from the string representation.
I have a one liner that works a little like this, but without any branches