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.
C Translation (author inactive).
Java translation
It's not clear for certain cases when and which cars the algorithm should turn away.
For instance, given,
I think Dave's gonna say no to just the first guy seeing he can then turn away only 1 vehicle instead of 6 (since the first guy would otherwise be stuck in the front). The prompt doesn't make it clear enough, though, as to what to return in this case.
If it's made clear that the goal is to achieve the minimal value, then the puzzle becomes much more interesting (albeit a lot harder), but also requires additional tests to ensure cases like the above are satisfied correctly.
If getting the minimum isn't required, then it really should be made clear that, for certain cases (like the above), multiple return values are accepted, as long as they don't turn anyone away unnecessarily (although, this makes generating random tests probably a bit difficult).
The description should be more explicit about the fact other vehicles cannot leave until the first one in queue does.
This comment is hidden because it contains spoiler information about the solution
Tests are susceptible to mutation of input: https://www.codewars.com/kata/reviews/565cee53843b15a3c800006a/groups/633a9cacb3da4b00012f7823
Hi, I really like the challenge of this kata.
One suggestion is that in the problem description to describe what happens if a car that is in the queue is being blocked by a car in front of it that is still waiting to leave.