题库chevron_right分类chevron_right单调栈
trending_up

单调栈

54 道题目
简单: 2中等: 29困难: 23

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

面试场景

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

常见误区

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

练习策略

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

推荐练习顺序

题库

单调栈 题库

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

慢加载专题题库

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

hourglass_bottom滚动续载
search
tune难度

当前展示 24 / 54 道题目

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

接雨水

Calculate the total trapped rain water using the elevation map array, leveraging dynamic programming and two-pointer pat…

困难
84

柱状图中最大的矩形

Find the maximal rectangular area in a histogram using stack-based state management for precise bar tracking and width c…

困难
85

最大矩形

Compute the largest rectangle of 1's in a binary matrix using dynamic programming and stack-based state transitions effi…

困难
316

去除重复字母

Remove duplicate letters from a string to produce the lexicographically smallest result using stack-based state manageme…

中等
321

拼接最大数

Create Maximum Number involves merging digits from two arrays while preserving order, maximizing the resulting number.

困难
402

移掉 K 位数字

Remove K Digits requires selecting which digits to drop using a monotonic stack for the smallest possible integer result…

中等
456

132 模式

Identify whether a given integer array contains a 132 pattern subsequence using efficient stack and search techniques.

中等
496

下一个更大元素 I

Find the next greater element for each number in nums1 from the nums2 array using an optimized approach.

简单
503

下一个更大元素 II

Solve the Next Greater Element II problem by using a stack-based state management approach for circular arrays.

中等
581

最短无序连续子数组

Find the shortest unsorted continuous subarray that, if sorted, would sort the entire array.

中等
654

最大二叉树

Construct a maximum binary tree by recursively selecting the largest element and dividing the array into left and right …

中等
739

每日温度

In the Daily Temperatures problem, you need to find out how many days to wait for a warmer temperature based on given da…

中等
768

最多能完成排序的块 II

Determine the maximum number of chunks you can split an array into so that sorting each chunk results in a fully sorted …

困难
769

最多能完成排序的块

The Max Chunks To Make Sorted problem requires you to split an array into the maximum number of chunks that can be sorte…

中等
853

车队

The Car Fleet problem asks how many car fleets will reach a target given their starting positions and speeds, considerin…

中等
901

股票价格跨度

Design an efficient algorithm using stacks to calculate the stock span for daily price quotes.

中等
907

子数组的最小值之和

Calculate the sum of minimum values across all subarrays of a given array modulo 10^9 + 7.

中等
962

最大宽度坡

Find the maximum width of a ramp where nums[i] <= nums[j] for i < j using a two-pointer approach.

中等
975

奇偶跳

Determine the number of valid starting indices in an array where you can reach the end with alternating odd and even jum…

困难
1008

前序遍历构造二叉搜索树

Construct a binary search tree directly from a preorder traversal array using stack-based state tracking efficiently.

中等
1019

链表中的下一个更大节点

Find the next greater value for each node in a linked list using monotonic stack techniques for efficient traversal.

中等
1081

不同字符的最小子序列

The Smallest Subsequence of Distinct Characters problem asks you to find the lexicographically smallest subsequence of a…

中等
1124

表现良好的最长时间段

The Longest Well-Performing Interval problem challenges you to find the longest subarray where tiring days exceed non-ti…

中等
1130

叶值的最小代价生成树

Compute the minimum sum of non-leaf nodes in a binary tree formed from array leaves using dynamic programming efficientl…

中等

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

关联高频模式

LeetCode 单调栈题型题解:54题训练路线