Queue Data Structure Last Updated : 23 Jul, 2025 Suggest changes Share Like Article Like Report A Queue Data Structure is a fundamental concept in computer science used for storing and managing data in a specific order. It follows the principle of "First in, First out" (FIFO), where the first element added to the queue is the first one to be removed. It is used as a buffer in computer systems where we have speed mismatch between two devices that communicate with each other. For example, CPU and keyboard and two devices in a networkQueue is also used in Operating System algorithms like CPU Scheduling and Memory Management, and many standard algorithms like Breadth First Search of Graph, Level Order Traversal of a Tree.BasicsIntroduction Basic OperationsArray ImplementationsLinked List ImplementationApplicationsImplementations in Different LanguagesQueue in C++ STLQueue In JavaQueue In PythonQueue In C#Queue in JavaScript Queue in Go Language Queue in ScalaEasy Problems Stack using Queues Queue using StacksLevel Order TraversalBFS for a Graph FIFO Page ReplacementMedium Problems K Queues in an array Reverse a QueueFirst non-repeating in a stream Min Knight steps for target Hard Problems Reverse First K of QueueSliding Window MaximumShortest path in a Binary MazeGenerate Binary from 1 to nMaximum Cost Path Snake and Ladder ProblemShortest safe route All possible walks with K edgesMinimum Cost Path Min Cost Path via intermediates Quick Links:‘Practice Problems’ on Queue ‘Quizzes’ on Queue Top 50 Queue Interview QuestionsDSA Tutorial H harendrakumar123 Follow 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 My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like