Home > DeveloperSection > Interviews > What are queues and stacks?

Posted on    September-04-2014 11:37 PM

 C# C# 
 1 Answer(s)
  1014  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    September-04-2014 12:00 AM

Stacks refer to a list in which all items are accessed and processed on the Last-In-First-Out (LIFO) basis. In a stack, elements are inserted (push operation) and deleted (pop operation) from the same end called top.

Queues refer to a list in which insertion and deletion of an item is done on the First-In-First-Out (FIFO) basis. The items in a queue are inserted from the one end, called the rear end, and are deleted from the other end, called the front end of the queue.

Don't want to miss updates? Please click the below button!

Follow MindStick