---
title: "What are queues and stacks?"  
description: "What are queues and stacks?"  
author: "Sumit Kesarwani"  
published: 2014-09-19  
updated: 2020-09-19  
canonical: https://www.mindstick.com/interview/2151/what-are-queues-and-stacks  
category: "c#"  
tags: [".net", "c#"]  
reading_time: 1 minute  

---

# 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.

## Answers

### Answer by Sumit Kesarwani

**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.


---

Original Source: https://www.mindstick.com/interview/2151/what-are-queues-and-stacks

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
