BFS Shortest Path in Unweighted Graph (O(V+E))
Learn BFS shortest path in an unweighted graph: O(V+E) time, queue + parent[] for path reconstruction. Step-by-step for interviews—start now.
Breadth First Search (Shortest Reach)
Compute shortest distances from a start node in an undirected graph with uniform edge weight using BFS.
Breadth-First Search (BFS) Algorithm: Queue + O(V+E)
Learn BFS traversal with a FIFO queue + visited set. Includes BFS pseudocode, example, and O(V+E) complexity—practice for FAANG interviews.
Design Circular Queue
Design a circular queue with fixed size that supports enqueue, dequeue, front, rear, isEmpty, and isFull operations.
Implement Queue
Implement a queue using arrays or linked lists with O(1) time complexity for all operations.
Implement Queue using Stacks
Implement a queue using two stacks with O(1) amortized time complexity for all operations.
Implement Stack using Queues
Implement a stack using two queues with O(1) amortized time complexity for all operations.
Level Order Traversal
Traverse a binary tree level by level from left to right.
Rotten Oranges Problem
Find the minimum time for all oranges to rot using BFS