Daisy Group Interview Question

The leetcode question on stack and queue