Queue

­

Queue

A queue is a container of objects (a linear collection) that are inserted and removed according to the first-in first-out (FIFO) principle.

November 14th, 2015|Categories: DS and Algorithms, Queue|Tags: , |

[Leetcode] Implement Queue using Stacks

Implement the following operations of a queue using stacks.

November 14th, 2015|Categories: DS and Algorithms, Queue, Stack|Tags: , , , |

[Leetcode] Implement Stack using Queues

Implement the following operations of a stack using queues: push(x), poll(), empty(), peek().

December 10th, 2015|Categories: DS and Algorithms, Queue, Stack|Tags: , , , , |