WHAT ARE QUEUES AND STACKS?

Sumit Kesarwani

Total Post:782

Points:3910
Posted by  Sumit Kesarwani
.NET  C# 
C#
 748  View(s)
Ratings:
Rate this:
  1. Sumit Kesarwani

    Post:782

    Points:3910
    What are queues and stacks?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!