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.
Although I get why its working, I feel that conceptually its misleading to talk about stacks. Technically you can only view the top of item of a stack or peek at without removing it but basically the solution is that you can peek at all the values if you want and then decide which values to remove.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Game of Two Stacks
You are viewing a single comment's thread. Return to all comments →
Although I get why its working, I feel that conceptually its misleading to talk about stacks. Technically you can only view the top of item of a stack or peek at without removing it but basically the solution is that you can peek at all the values if you want and then decide which values to remove.