What is Queue Data Structure? Last Updated : 07 Jul, 2023 Comments Improve Suggest changes Like Article Like Report What is Queue Data Structure?A Queue is defined as a linear data structure that is open at both ends and the operations are performed in First In First Out (FIFO) order. We define a queue to be a list in which all additions to the list are made at one end, and all deletions from the list are made at the other end. The element which is first pushed into the order, the operation is first performed on that. Queue Representation:Like stacks, Queues can also be represented in an array: In this representation, the Queue is implemented using the array. Variables used in this case are Queue: the name of the array storing queue elements.Front: the index where the first element is stored in the array representing the queue.Rear: the index where the last element is stored in an array representing the queue.FIFO Principle of Queue:A Queue is like a line waiting to purchase tickets, where the first person in line is the first person served. (i.e. First come first serve).Position of the entry in a queue ready to be served, that is, the first entry that will be removed from the queue, is called the front of the queue(sometimes, head of the queue), similarly, the position of the last entry in the queue, that is, the one most recently added, is called the rear (or the tail) of the queue. See the below figure.Characteristics of Queue:Queue can handle multiple data.We can access both ends.They are fast and flexible. Queue Data Structure Visit Course Queue Data Structure WHAT IS QUEUE? | Queue Data Structures | DSA Course Comment More info C code_r Follow Improve Article Tags : Queue DSA Explore DSA FundamentalsLogic Building Problems 2 min read Analysis of Algorithms 1 min read Data StructuresArray Data Structure 3 min read String in Data Structure 2 min read Hashing in Data Structure 2 min read Linked List Data Structure 2 min read Stack Data Structure 2 min read Queue Data Structure 2 min read Tree Data Structure 2 min read Graph Data Structure 3 min read Trie Data Structure 15+ min read AlgorithmsSearching Algorithms 2 min read Sorting Algorithms 3 min read Introduction to Recursion 14 min read Greedy Algorithms 3 min read Graph Algorithms 3 min read Dynamic Programming or DP 3 min read Bitwise Algorithms 4 min read AdvancedSegment Tree 2 min read Binary Indexed Tree or Fenwick Tree 15 min read Square Root (Sqrt) Decomposition Algorithm 15+ min read Binary Lifting 15+ min read Geometry 2 min read Interview PreparationInterview Corner 3 min read GfG160 3 min read Practice ProblemGeeksforGeeks Practice - Leading Online Coding Platform 6 min read Problem of The Day - Develop the Habit of Coding 5 min read Like