Can You Feed These Hungry Students On LeetCode?

A Peek Into Arrays, Stacks, Queues & Deques

Dr. Ashish Bamania

--

Generated with DALL-E 3

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) and 1 (square shaped).

These sandwiches are put in a Stack.

--

--

Dr. Ashish Bamania

Doctor 🩺 | Self-Taught Software Developer 👨‍💻 | Author 📘 | AIIMS, New Delhi 👨‍🎓 | 'AI In 100 Images': https://bamaniaashish.gumroad.com/l/visual_ai