LeetCodechevron_rightCategorieschevron_rightqueue
view_stream

queue

41 problems
Easy: 6Medium: 19Hard: 16

queue is one of the most repeated interview dimensions. Start with edge-safe fundamentals, then move into pattern-level trade-offs.

Interview Signal

Frequently tests problem modeling, edge handling, and verbal clarity.

Common Pitfall

Template-only answers break under follow-up questioning.

Practice Strategy

Practice in 3-5 problem rounds and always review complexity alternatives.

Recommended Progression

#TitleDifficulty
207

Course Schedule

Determine if all courses can be completed by analyzing prerequisite dependencies using indegree tracking and topological…

Medium
225

Implement Stack using Queues

This problem tests your ability to simulate a LIFO stack using two queues while preserving all standard stack operations…

Easy
232

Implement Queue using Stacks

Implement a queue using two stacks, focusing on stack-based state management to achieve FIFO behavior in a queue.

Easy
239

Sliding Window Maximum

Solve the "Sliding Window Maximum" problem using efficient techniques like the sliding window, deque, and priority queue…

Hard
341

Flatten Nested List Iterator

Implement an iterator to flatten a nested list of integers, accounting for potential nesting levels.

Medium
387

First Unique Character in a String

Find the index of the first non-repeating character in a string using efficient queue-driven state processing.

Easy
622

Design Circular Queue

Design a circular queue that allows efficient FIFO operations using linked-list pointer manipulation to optimize space u…

Medium
641

Design Circular Deque

Design and implement a circular deque using linked-list pointer manipulation, ensuring efficient insertion and deletion …

Medium
649

Dota2 Senate

The Dota2 Senate problem involves simulating voting rounds between Radiant and Dire senators until one party wins, using…

Medium
862

Shortest Subarray with Sum at Least K

Find the shortest subarray with a sum of at least k using binary search and sliding window techniques.

Hard
918

Maximum Sum Circular Subarray

Find the maximum sum of a circular subarray using state transition dynamic programming, optimizing for wraparound cases …

Medium
933

Number of Recent Calls

The "Number of Recent Calls" problem involves designing a class to efficiently track recent requests within a time windo…

Easy
936

Stamping The Sequence

Solve Stamping The Sequence with stack-based state management to convert string s to target using stamp efficiently.

Hard
950

Reveal Cards In Increasing Order

Determine the initial deck order to reveal cards in strictly increasing order using queue-driven simulation logic.

Medium
995

Minimum Number of K Consecutive Bit Flips

Determine the minimum number of k-length consecutive bit flips needed to convert all zeros to ones in a binary array eff…

Hard
1425

Constrained Subsequence Sum

Solve the Constrained Subsequence Sum problem using dynamic programming, sliding window, and priority queues to maximize…

Hard
1438

Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit

Find the longest subarray with elements whose absolute difference is within a specified limit using a sliding window app…

Medium
1499

Max Value of Equation

Max Value of Equation asks to find the maximum value of a specific equation on a set of 2D points using sliding window t…

Hard
1670

Design Front Middle Back Queue

Implement a queue that efficiently handles push and pop operations at the front, middle, and back using pointer manipula…

Medium
1687

Delivering Boxes from Storage to Ports

Optimize the minimum number of trips to deliver boxes to ports under strict ship constraints using dynamic programming t…

Hard
1696

Jump Game VI

Jump Game VI challenges you to maximize your score while jumping through an array using state transition dynamic program…

Medium
1700

Number of Students Unable to Eat Lunch

Simulate a queue of students with sandwich preferences and determine how many can't eat based on available sandwiches.

Easy
1823

Find the Winner of the Circular Game

Find the winner of a circular game by simulating the elimination process with a queue-driven approach.

Medium
1825

Finding MK Average

Find the MKAverage of a stream of integers using a queue-driven approach with efficient state management.

Hard
2071

Maximum Number of Tasks You Can Assign

Maximize the number of tasks that can be completed by efficiently using workers and magical pills.

Hard
2073

Time Needed to Buy Tickets

Calculate the total time for a specific person to buy all their tickets using queue-driven state processing.

Easy
2327

Number of People Aware of a Secret

Calculate how many people know a secret over n days using state transition dynamic programming and careful simulation of…

Medium
2398

Maximum Number of Robots Within Budget

Determine the maximum number of consecutive robots you can operate without exceeding a given budget using efficient bina…

Hard
2407

Longest Increasing Subsequence II

Determine the longest increasing subsequence in an array where consecutive elements differ by at most k using dynamic pr…

Hard
2444

Count Subarrays With Fixed Bounds

Count all subarrays where the minimum and maximum match given bounds using efficient sliding window tracking techniques.

Hard
2526

Find Consecutive Integers from a Data Stream

Design a data stream checker to identify consecutive integers from a stream, focusing on handling state transitions effi…

Medium
2528

Maximize the Minimum Powered City

Determine the maximum minimum power a city can achieve by strategically adding power stations using binary search and pr…

Hard
2762

Continuous Subarrays

Count all continuous subarrays efficiently using sliding window with running max-min state tracking for array consistenc…

Medium
2944

Minimum Number of Coins for Fruits

Calculate the minimum coins to buy fruits using state transition dynamic programming while handling rewards and purchase…

Medium
2945

Find Maximum Non-decreasing Array Length

Solve Find Maximum Non-decreasing Array Length with prefix-sum DP transitions that maximize kept segments while preservi…

Hard
3117

Minimum Sum of Values by Dividing Array

Solve the problem of dividing an array into subarrays to match specified bitwise AND values using dynamic programming.

Hard
3191

Minimum Operations to Make Binary Array Elements Equal to One I

Find the minimum number of operations to make all elements of a binary array equal to one using sliding window and state…

Medium
3420

Count Non-Decreasing Subarrays After K Operations

This problem asks you to count non-decreasing subarrays in a given array after applying at most k operations.

Hard
3508

Implement Router

Efficiently design a Router class to manage network packets with memory limits using array scanning and hash lookups.

Medium
3578

Count Partitions With Max-Min Difference at Most K

Count the number of valid ways to partition an array into contiguous segments where max-min difference is at most k.

Medium
3589

Count Prime-Gap Balanced Subarrays

Count the number of prime-gap balanced subarrays in an integer array using sliding window techniques and running state u…

Medium

Related Patterns

Queue LeetCode Problems: 41 Solutions