We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
1) This problem explains what a queue is and how it operates. Then it states you'll implement a queue by building two stacks. No explanation whatsover regarding what stacks are or what methods they implment. Nevermind that the code has no means to ensure your implementation utilizes stacks.
2) The explanation of what a queue is says it implements enqueue and dequeue then asks you to do a peek.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Queue using Two Stacks
You are viewing a single comment's thread. Return to all comments →
1) This problem explains what a queue is and how it operates. Then it states you'll implement a queue by building two stacks. No explanation whatsover regarding what stacks are or what methods they implment. Nevermind that the code has no means to ensure your implementation utilizes stacks.
2) The explanation of what a queue is says it implements enqueue and dequeue then asks you to do a peek.