Queue Implementation in C++
This article covers queue implementation in C++. A queue is a linear data structure that serves as a container of objects that are inserted and removed according to the FIFO (First–In, First–Out) principle.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedThis article covers queue implementation in C++. A queue is a linear data structure that serves as a container of objects that are inserted and removed according to the FIFO (First–In, First–Out) principle.
This article covers queue implementation using a linked list. A queue is a linear data structure that serves as a collection of elements, with three main operations: enqueue, dequeue and peek.
This article covers circular queue implementation in C. A queue is a linear data structure that serves as a collection of elements, with three main operations: Enqueue, Dequeue, and Peek.
Given a chessboard, find the shortest distance (minimum number of steps) taken by a knight to reach a given destination from a given source.
Given a digraph (directed graph), find the total number of routes to reach the destination from a given source with exactly m edges.
Given a connected undirected graph, find if it contains any cycle or not. For example, the following graph contains a cycle 2–5–10–6–2.
Find the minimum number of throws required to win a given Snake and Ladder game. For example, the following game requires at least 7 dice throws to win.
Given a graph, check if it is bipartite or not. A bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint sets U and V such that every edge connects a vertex in U to one in V.
Breadth–first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a ‘search key’) and explores the neighbor nodes first before moving to the next-level neighbors.