Showing posts from April, 2014

Implement a Stack using two Queues in Java

Stack is an abstract data structure with property of   Last In First Out as contrast to queue - First In First Out .In order to implement stack using queue we have to choose between which operation do we want to make costly - push() or pop(), push() …

Implement a queue using two stacks in Java

Queue is an abstract data structure with property of   First In First Out as contrast to stack's property  First In Last Out. In order to implement queue using stack we have to choose between which operation do we want to make costly - enqueue() …

Load More
That is All