Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Misc
8.8K+ articles
C++
4.3K+ articles
Tree
1.4K+ articles
STL
1.3K+ articles
Graph
953+ articles
Queue
371+ articles
BFS
228+ articles
tree-level-order
123+ articles
cpp-queue
63 posts
Recent Articles
Popular Articles
Why Doesn't std::queue::pop Return Value?
Last Updated: 24 July 2024
In C++, we use std::queue which is a container adapter in the standard template library (STL) and is used for managing a collection of elements in a FIFO (first-in, first-...
read more
STL
C++
cpp-queue
Picked
How to Implement a Circular Buffer Using std::vector?
Last Updated: 03 April 2025
A circular buffer, also known as a cyclic buffer or ring buffer, is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. In this arti...
read more
cpp-vector
C++
C++ Programs
cpp-queue
Picked
CPP Examples
How to Create a Stack of Queue in C++?
Last Updated: 13 March 2024
In C++, the std::stack is a container that follows the LIFO (Last In, First Out) rule, whereas std::queue is a container that follows the FIFO (First In, First Out) rule. ...
read more
STL
C++
C++ Programs
cpp-queue
cpp-stack
Picked
CPP Examples
How to Enqueue an Element into a Queue in C++?
Last Updated: 04 March 2024
In C++ STL, we have a queuecontainer that simulates the queue data structure and follows the FIFO (First In, First Out) rule. In this article, we will learn how to enqueue...
read more
STL
C++
C++ Programs
cpp-queue
Picked
CPP Examples
How to Push All Elements from a Vector to a Queue in C++?
Last Updated: 09 February 2024
In C++, vectors are dynamic arrays while the queue is a data structure that follows the FIFO (First In First Out) property. In this article, we will learn how to push all ...
read more
STL
cpp-vector
C++
C++ Programs
cpp-queue
Picked
CPP Examples
C++ STL - Reverse Priority Queue
Last Updated: 02 November 2022
A priority Queue is an abstract data type that resembles a queue, and each element has a corresponding priority value. Priority queues are built on the top of the max heap...
read more
Technical Scripter
STL
C++
cpp-queue
Picked
Technical Scripter 2022
How to Iterate a STL Queue in C++?
Last Updated: 06 February 2023
A Queue is a linear structure that follows a particular order in which the operations are performed. The order is First In First Out (FIFO).Syntax:queuedatatype queuename;...
read more
STL
C++
C++ Programs
cpp-queue
Picked
Minimum length paths between 1 to N including each node
Last Updated: 09 February 2023
Given an undirected graph consisting of N nodes and M edges, the task is to find the minimum length of the path from Node 1 to Node N passing from every possible node of t...
read more
Arrays
Graph
Queue
Mathematical
BFS
cpp-queue
DSA
Number of minimum length paths between 1 to N including each node
Last Updated: 16 February 2023
Given an undirected and unweighted graph of N nodes and M edges, the task is to count the minimum length paths between node 1 to N through each of the nodes. If there is d...
read more
Arrays
Graph
Mathematical
BFS
cpp-queue
DSA
Queries to find number of connected grid components of given sizes in a Matrix
Last Updated: 09 February 2023
Given a matrix mat[][] containing only of 0s and 1s, and an array queries[], the task is for each query, say k, is to find the number of connected grid components (cells c...
read more
Graph
Algorithms
Searching
Mathematical
Matrix
BFS
Data Structures
cpp-queue
connected-components
DSA
Design Front Middle Back Queue using STL
Last Updated: 04 August 2021
Design a data structure that supports the following operations in queue efficiently:push__front(x): Insert an element at the front of the queue.push__middle(x): Inserts el...
read more
Linked List
Queue
Competitive Programming
STL
C++ Programs
cpp-queue
DSA
Advantages of circular queue over linear queue
Last Updated: 18 March 2021
Linear Queue: A Linear Queue is generally referred to as Queue. It is a linear data structure that follows the FIFO (First In First Out) order. A real-life example of a qu...
read more
Queue
Technical Scripter
Data Structures
cpp-queue
Technical Scripter 2020
DSA
Find a set of at most N/2 nodes from a Graph such that all remaining nodes are directly connected to one of the chosen nodes
Last Updated: 07 March 2023
Given an integer N, representing the number of nodes present in an undirected graph, with each node valued from 1 to N, and a 2D array Edges[][], representing the pair of ...
read more
Graph
Queue
Searching
BFS
graph-connectivity
Graph Traversals
cpp-queue
DSA
Minimum bridges required to be crossed to reach N<sup>th</sup> city
Last Updated: 27 May 2021
Given an integer N denoting the number of connected cities ( numbered from 1 to N ) and a 2D array arr[][] consisting of pairs connected to each other by bidirectional bri...
read more
Arrays
Graph
Queue
Algorithms
Amazon-Question
interview-preparation
BFS
Algorithms-Graph Traversals
cpp-queue
DSA
Minimum time required to fill given N slots
Last Updated: 10 October 2023
Given an integer N which denotes the number of slots, and an array arr[] consisting of K integers in the range [1, N] . Each element of the array are in the range [1, N] w...
read more
Arrays
Queue
Searching
BFS
cpp-queue
tree-level-order
DSA
1
2
3
4
5
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !