When to use it
Reach for Recent requests when a queue & deque problem matches the cues in this lesson — especially after you’ve ruled out a brute-force nested scan.
Pattern
Recent requests is a reusable approach under Queue & Deque. Once you recognize the shape of the input and the ask, this pattern gives you a standard plan instead of inventing a new algorithm from scratch.
Reach for Recent requests when a queue & deque problem matches the cues in this lesson — especially after you’ve ruled out a brute-force nested scan.
Reference implementation in C#, Python, Java, JavaScript, and C++.
Interviewers grade pattern recognition. Naming Recent requests early shows you can classify the problem inside Linear DS.
Drill Recent requests with Queue & Deque problems — filter the bank and solve 2–3 Easy/Medium items while saying the invariant out loud.
Related Queue & Deque problems — open any one and apply Recent requests.
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