A row of N spaces; cars need 1, 2 or 3 consecutive spaces. Park each car in the leftmost gap that fits, and free spaces when it leaves.
A row of N spaces; cars need 1, 2 or 3 consecutive spaces. Park each car in the leftmost gap that fits, and free spaces when it leaves.
The discussion opens with the full question.