话题分类 > 栈
# | 题目 | 标签 | 难度 |
---|---|---|---|
2130 | 链表最大孪生和 | [栈] [链表] [双指针] | Medium |
2116 | 判断一个括号字符串是否有效 | [栈] [贪心] [字符串] | Medium |
2104 | 子数组范围和 | [栈] [数组] [单调栈] | Medium |
2030 | 含特定字母的最小子序列 | [栈] [贪心] [字符串] [单调栈] | Hard |
2019 | 解出数学表达式的学生分数 | [栈] [记忆化搜索] [数组] [数学] [字符串] [动态规划] | Hard |
1996 | 游戏中弱角色的数量 | [栈] [贪心] [数组] [排序] [单调栈] | Medium |
1963 | 使字符串平衡的最小交换次数 | [栈] [贪心] [双指针] [字符串] | Medium |
1950 | 所有子数组最小值中的最大值 🔒 | [栈] [数组] [单调栈] | Medium |
1944 | 队列中可以看到的人数 | [栈] [数组] [单调栈] | Hard |
1896 | 反转表达式值的最少操作次数 | [栈] [数学] [字符串] [动态规划] | Hard |
1856 | 子数组最小乘积的最大值 | [栈] [数组] [前缀和] [单调栈] | Medium |
1793 | 好子数组的最大分数 | [栈] [数组] [双指针] [二分查找] [单调栈] | Hard |
1776 | 车队 II | [栈] [数组] [数学] [单调栈] [堆(优先队列)] | Hard |
1762 | 能看到海景的建筑物 🔒 | [栈] [数组] [单调栈] | Medium |
1756 | 设计最近使用(MRU)队列 🔒 | [栈] [设计] [树状数组] [数组] [哈希表] [有序集合] | Medium |
1717 | 删除子字符串的最大得分 | [栈] [贪心] [字符串] | Medium |
1700 | 无法吃午餐的学生数量 | [栈] [队列] [数组] [模拟] | Easy |
1673 | 找出最具竞争力的子序列 | [栈] [贪心] [数组] [单调栈] | Medium |
1653 | 使字符串平衡的最少删除次数 | [栈] [字符串] [动态规划] | Medium |
1628 | 设计带解析函数的表达式树 🔒 | [栈] [树] [设计] [数学] [二叉树] | Medium |
1614 | 括号的最大嵌套深度 | [栈] [字符串] | Easy |
1598 | 文件夹操作日志搜集器 | [栈] [数组] [字符串] | Easy |
1597 | 根据中缀表达式构造二叉表达式树 🔒 | [栈] [树] [字符串] [二叉树] | Hard |
1586 | 二叉搜索树迭代器 II 🔒 | [栈] [树] [设计] [二叉搜索树] [二叉树] [迭代器] | Medium |
1574 | 删除最短的子数组使剩余数组有序 | [栈] [数组] [双指针] [二分查找] [单调栈] | Medium |
1544 | 整理字符串 | [栈] [字符串] | Easy |
1541 | 平衡括号字符串的最少插入次数 | [栈] [贪心] [字符串] | Medium |
1526 | 形成目标数组的子数组最少增加次数 | [栈] [贪心] [数组] [动态规划] [单调栈] | Hard |
1504 | 统计全 1 子矩形 | [栈] [数组] [动态规划] [矩阵] [单调栈] | Medium |
1475 | 商品折扣后的最终价格 | [栈] [数组] [单调栈] | Easy |
1472 | 设计浏览器历史记录 | [栈] [设计] [数组] [链表] [数据流] [双向链表] | Medium |
1441 | 用栈操作构建数组 | [栈] [数组] [模拟] | Easy |
1381 | 设计一个支持增量操作的栈 | [栈] [设计] [数组] | Medium |
1265 | 逆序打印不可变链表 🔒 | [栈] [递归] [链表] [双指针] | Medium |
1249 | 移除无效的括号 | [栈] [字符串] | Medium |
1214 | 查找两棵二叉搜索树之和 🔒 | [栈] [树] [深度优先搜索] [二叉搜索树] [双指针] [二分查找] [二叉树] | Medium |
1209 | 删除字符串中的所有相邻重复项 II | [栈] [字符串] | Medium |
1190 | 反转每对括号间的子串 | [栈] [字符串] | Medium |
1172 | 餐盘栈 | [栈] [设计] [哈希表] [堆(优先队列)] | Hard |
1130 | 叶值的最小代价生成树 | [栈] [贪心] [动态规划] [单调栈] | Medium |
1124 | 表现良好的最长时间段 | [栈] [数组] [哈希表] [前缀和] [单调栈] | Medium |
1111 | 有效括号的嵌套深度 | [栈] [字符串] | Medium |
1106 | 解析布尔表达式 | [栈] [递归] [字符串] | Hard |
1096 | 花括号展开 II | [栈] [广度优先搜索] [字符串] [回溯] | Hard |
1081 | 不同字符的最小子序列 | [栈] [贪心] [字符串] [单调栈] | Medium |
1063 | 有效子数组的数目 🔒 | [栈] [数组] [单调栈] | Hard |
1047 | 删除字符串中的所有相邻重复项 | [栈] [字符串] | Easy |
1021 | 删除最外层的括号 | [栈] [字符串] | Easy |
1019 | 链表中的下一个更大节点 | [栈] [数组] [链表] [单调栈] | Medium |
1008 | 前序遍历构造二叉搜索树 | [栈] [树] [二叉搜索树] [数组] [二叉树] [单调栈] | Medium |
1006 | 笨阶乘 | [栈] [数学] [模拟] | Medium |
1003 | 检查替换后的词是否有效 | [栈] [字符串] | Medium |
975 | 奇偶跳 | [栈] [数组] [动态规划] [有序集合] [单调栈] | Hard |
962 | 最大宽度坡 | [栈] [数组] [单调栈] | Medium |
946 | 验证栈序列 | [栈] [数组] [模拟] | Medium |
936 | 戳印序列 | [栈] [贪心] [队列] [字符串] | Hard |
921 | 使括号有效的最少添加 | [栈] [贪心] [字符串] | Medium |
907 | 子数组的最小值之和 | [栈] [数组] [动态规划] [单调栈] | Medium |
901 | 股票价格跨度 | [栈] [设计] [数据流] [单调栈] | Medium |
897 | 递增顺序搜索树 | [栈] [树] [深度优先搜索] [二叉搜索树] [二叉树] | Easy |
895 | 最大频率栈 | [栈] [设计] [哈希表] [有序集合] | Hard |
880 | 索引处的解码字符串 | [栈] [字符串] | Medium |
856 | 括号的分数 | [栈] [字符串] | Medium |
853 | 车队 | [栈] [数组] [排序] [单调栈] | Medium |
844 | 比较含退格的字符串 | [栈] [双指针] [字符串] [模拟] | Easy |
772 | 基本计算器 III 🔒 | [栈] [递归] [数学] [字符串] | Hard |
770 | 基本计算器 IV | [栈] [递归] [哈希表] [数学] [字符串] | Hard |
769 | 最多能完成排序的块 | [栈] [贪心] [数组] [排序] [单调栈] | Medium |
768 | 最多能完成排序的块 II | [栈] [贪心] [数组] [排序] [单调栈] | Hard |
739 | 每日温度 | [栈] [数组] [单调栈] | Medium |
736 | Lisp 语法解析 | [栈] [递归] [哈希表] [字符串] | Hard |
735 | 行星碰撞 | [栈] [数组] | Medium |
726 | 原子的数量 | [栈] [哈希表] [字符串] [排序] | Hard |
716 | 最大栈 🔒 | [栈] [设计] [链表] [双向链表] [有序集合] | Easy |
682 | 棒球比赛 | [栈] [数组] [模拟] | Easy |
678 | 有效的括号字符串 | [栈] [贪心] [字符串] [动态规划] | Medium |
654 | 最大二叉树 | [栈] [树] [数组] [分治] [二叉树] [单调栈] | Medium |
636 | 函数的独占时间 | [栈] [数组] | Medium |
591 | 标签验证器 | [栈] [字符串] | Hard |
590 | N 叉树的后序遍历 | [栈] [树] [深度优先搜索] | Easy |
589 | N 叉树的前序遍历 | [栈] [树] [深度优先搜索] | Easy |
581 | 最短无序连续子数组 | [栈] [贪心] [数组] [双指针] [排序] [单调栈] | Medium |
503 | 下一个更大元素 II | [栈] [数组] [单调栈] | Medium |
496 | 下一个更大元素 I | [栈] [数组] [哈希表] [单调栈] | Easy |
484 | 寻找排列 🔒 | [栈] [贪心] [数组] | Medium |
456 | 132 模式 | [栈] [数组] [二分查找] [有序集合] [单调栈] | Medium |
445 | 两数相加 II | [栈] [链表] [数学] | Medium |
439 | 三元表达式解析器 🔒 | [栈] [递归] [字符串] | Medium |
426 | 将二叉搜索树转化为排序的双向链表 🔒 | [栈] [树] [深度优先搜索] [二叉搜索树] [链表] [二叉树] [双向链表] | Medium |
402 | 移掉 K 位数字 | [栈] [贪心] [字符串] [单调栈] | Medium |
394 | 字符串解码 | [栈] [递归] [字符串] | Medium |
388 | 文件的最长绝对路径 | [栈] [深度优先搜索] [字符串] | Medium |
385 | 迷你语法分析器 | [栈] [深度优先搜索] [字符串] | Medium |
364 | 加权嵌套序列和 II 🔒 | [栈] [深度优先搜索] [广度优先搜索] | Medium |
341 | 扁平化嵌套列表迭代器 | [栈] [树] [深度优先搜索] [设计] [队列] [迭代器] | Medium |
331 | 验证二叉树的前序序列化 | [栈] [树] [字符串] [二叉树] | Medium |
321 | 拼接最大数 | [栈] [贪心] [单调栈] | Hard |
316 | 去除重复字母 | [栈] [贪心] [字符串] [单调栈] | Medium |
272 | 最接近的二叉搜索树值 II 🔒 | [栈] [树] [深度优先搜索] [二叉搜索树] [双指针] [二叉树] [堆(优先队列)] | Hard |
255 | 验证前序遍历序列二叉搜索树 🔒 | [栈] [树] [二叉搜索树] [递归] [二叉树] [单调栈] | Medium |
234 | 回文链表 | [栈] [递归] [链表] [双指针] | Easy |
232 | 用栈实现队列 | [栈] [设计] [队列] | Easy |
227 | 基本计算器 II | [栈] [数学] [字符串] | Medium |
225 | 用队列实现栈 | [栈] [设计] [队列] | Easy |
224 | 基本计算器 | [栈] [递归] [数学] [字符串] | Hard |
173 | 二叉搜索树迭代器 | [栈] [树] [设计] [二叉搜索树] [二叉树] [迭代器] | Medium |
155 | 最小栈 | [栈] [设计] | Easy |
150 | 逆波兰表达式求值 | [栈] [数组] [数学] | Medium |
145 | 二叉树的后序遍历 | [栈] [树] [深度优先搜索] [二叉树] | Easy |
144 | 二叉树的前序遍历 | [栈] [树] [深度优先搜索] [二叉树] | Easy |
143 | 重排链表 | [栈] [递归] [链表] [双指针] | Medium |
114 | 二叉树展开为链表 | [栈] [树] [深度优先搜索] [链表] [二叉树] | Medium |
94 | 二叉树的中序遍历 | [栈] [树] [深度优先搜索] [二叉树] | Easy |
85 | 最大矩形 | [栈] [数组] [动态规划] [矩阵] [单调栈] | Hard |
84 | 柱状图中最大的矩形 | [栈] [数组] [单调栈] | Hard |
71 | 简化路径 | [栈] [字符串] | Medium |
42 | 接雨水 | [栈] [数组] [双指针] [动态规划] [单调栈] | Hard |
32 | 最长有效括号 | [栈] [字符串] [动态规划] | Hard |
20 | 有效的括号 | [栈] [字符串] | Easy |