Created
August 8, 2015 20:13
-
-
Save bragboy/b59e9b2fc9953161c21e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dsa.stack; | |
public class TestQueue { | |
public static void main(String[] args) { | |
QueueStack<Integer> queueUsingStack = new QueueStack<Integer>(); | |
queueUsingStack.enQueue(1).enQueue(2).enQueue(3).enQueue(4).enQueue(5).enQueue(6); | |
System.out.println("Queue current size is : "+queueUsingStack.size()); | |
System.out.println(queueUsingStack.deQueue()); | |
System.out.println(queueUsingStack.deQueue()); | |
System.out.println(queueUsingStack.deQueue()); | |
System.out.println(queueUsingStack.deQueue()); | |
queueUsingStack.enQueue(10).enQueue(11).enQueue(12); | |
System.out.println(queueUsingStack.deQueue()); | |
System.out.println(queueUsingStack.deQueue()); | |
System.out.println(queueUsingStack.deQueue()); | |
System.out.println(queueUsingStack.deQueue()); | |
} | |
} | |
/* | |
Queue current size is : 6 | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
10 | |
11 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment