题库chevron_right分类chevron_right队列
view_stream

队列

41 道题目
简单: 6中等: 19困难: 16

队列 是技术面试里最常出现的能力维度之一。建议先掌握基础题型的边界处理,再逐步过渡到模式识别和复杂度 trade-off。

面试场景

高频考察问题建模、边界条件与口头表达的清晰度。

常见误区

只背模板不解释为什么,容易在追问里失分。

练习策略

每轮练 3-5 题,固定复盘复杂度和可替代解法。

推荐练习顺序

题库

队列 题库

先展示一段最适合快速浏览的题目列表,继续滚动时再慢慢续载,避免专题页被长列表一下子拉穿。

慢加载专题题库

适合这类题很多的专题,先扫结构,再逐步深入。

hourglass_bottom滚动续载
search
tune难度

当前展示 24 / 41 道题目

每次续载 24 题
#题目难度
207

课程表

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

中等
225

用队列实现栈

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

简单
232

用栈实现队列

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

简单
239

滑动窗口最大值

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

困难
341

扁平化嵌套列表迭代器

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

中等
387

字符串中的第一个唯一字符

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

简单
622

设计循环队列

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

中等
641

设计循环双端队列

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

中等
649

Dota2 参议院

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

中等
862

和至少为 K 的最短子数组

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

困难
918

环形子数组的最大和

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

中等
933

最近的请求次数

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

简单
936

戳印序列

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

困难
950

按递增顺序显示卡牌

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

中等
995

K 连续位的最小翻转次数

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

困难
1425

带限制的子序列和

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

困难
1438

绝对差不超过限制的最长连续子数组

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

中等
1499

满足不等式的最大值

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

困难
1670

设计前中后队列

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

中等
1687

从仓库到码头运输箱子

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

困难
1696

跳跃游戏 VI

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

中等
1700

无法吃午餐的学生数量

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

简单
1823

找出游戏的获胜者

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

中等
1825

求出 MK 平均值

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

困难

swap_vert在题库框内继续向下滚动,也会自动续载

关联高频模式

LeetCode 队列题型题解:41题训练路线