Queue using two stacks in Java

Previously I have discussed the implementation of stack data structure using two queues. This post discusses about queue implementation using two stacks. The implementation uses Stack class available from java.util package. Prerequisites: Knowledge of Java, data structures, stack data structure and the operations that can be performed on it. Basics of stack and knowledge ofContinue reading “Queue using two stacks in Java”

Design a site like this with WordPress.com
Get started