BFS partner
Queues process nodes in discovery order — essential for shortest paths in unweighted graphs and level-order trees.
Lesson
FIFO and double-ended queues for BFS and sliding extrema.
Loading solution…
Queues process nodes in discovery order — essential for shortest paths in unweighted graphs and level-order trees.
Maintain candidates for window max/min so the front is always the answer for the current window.
Showing 24 of the related problems in the 1000-question bank.
Sliding Window Maximum
Monotonic Deque
Moving Average from Data Stream — Practice 32
BFS
Find the Winner of Circular Game — Practice 35
BFS
Time Needed to Buy Tickets — Practice 38
BFS
Reveal Cards In Increasing Order — Practice 41
BFS
Number of Recent Calls — Practice 45
BFS
Design Circular Deque — Practice 48
BFS
Moving Average from Data Stream — Practice 51
BFS
Find the Winner of Circular Game — Practice 54
BFS
Time Needed to Buy Tickets — Practice 57
BFS
Reveal Cards In Increasing Order — Practice 60
BFS
Number of Recent Calls — Practice 64
BFS
Design Circular Deque — Practice 67
BFS
Moving Average from Data Stream — Practice 70
BFS
Find the Winner of Circular Game — Practice 73
BFS
Time Needed to Buy Tickets — Practice 76
BFS
Reveal Cards In Increasing Order — Practice 79
BFS
Number of Recent Calls — Practice 83
BFS
Design Circular Deque — Practice 86
BFS
Moving Average from Data Stream — Practice 89
BFS
Find the Winner of Circular Game — Practice 92
BFS
Time Needed to Buy Tickets — Practice 95
BFS
Reveal Cards In Increasing Order — Practice 98
BFS
Number of Recent Calls — Practice 102
BFS
Got the lesson?
Mark Queue & Deque as understood when the ideas stick.