Can You Feed These Hungry Students On LeetCode?
A Peek Into Arrays, Stacks, Queues & Deques
3 min readMay 4, 2024
I recently came across an interesting problem on Leetcode.
It goes like this —
There’s a school cafeteria that offers two kinds of sandwiches (denoted with
0
(circular shaped) and1
(square shaped).These sandwiches are put in a Stack.