a) and walk-ins (b). The queue is written as a string queue of the letters a and b.
The rule says everyone with a booking must stand ahead of every walk-in. Return True if no a comes after any b, and False otherwise. If one of the letters is missing entirely, the rule holds.queue="aaab" → True
All three as come before the only b.
queue="abba" → False
The last a comes after two bs.
queue="aa" → True
There are no bs, so no a comes after a b.
len(queue) ≤ 100queue consists only of the letters a and bqueue="aaab"
True
Run checks the first 3 tests in your browser. Submit checks all 155 tests on the server, hidden ones included.