Algorithm For Implementing Queue Using Stacks Leetcode 1501