Search
⌘K

Leetcode 1700. Number of Students Unable to Eat Lunch

Given a queue of students with binary sandwich preferences and a stack of sandwiches (top first), students rotate to the back until someone takes the top sandwich; return how many students remain when no one wants the current top. The problem reduces to scanning the sandwich stack and tracking remaining counts of each preference until a sandwich type has zero students left.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.