Queue – A Tale of Two Stacks

I looked at the HackerRank challenge Queues: A Tale of Two Stacks. If interested take a look at the requirements at the following URL:  https://www.hackerrank.com/challenges/ctci-queue-using-two-stacks

Initially I followed the recommendation of using two stacks. The brute force approach worked for the test case but it was too slow in 3 or 4 test cases. Continue reading “Queue – A Tale of Two Stacks”