面试场景
高频考察问题建模、边界条件与口头表达的清晰度。
常见误区
只背模板不解释为什么,容易在追问里失分。
练习策略
每轮练 3-5 题,固定复盘复杂度和可替代解法。
推荐练习顺序
题库
贪心 题库
先展示一段最适合快速浏览的题目列表,继续滚动时再慢慢续载,避免专题页被长列表一下子拉穿。
慢加载专题题库
适合这类题很多的专题,先扫结构,再逐步深入。
当前展示 24 / 377 道题目
每次续载 24 题盛最多水的容器
Find two vertical lines that can form a container with the most water in a given array of heights.
通配符匹配
Implement full wildcard pattern matching using '?' and '*' by applying state transition dynamic programming with careful…
跳跃游戏 II
Jump Game II requires finding the minimum jumps to reach the end of an array using dynamic programming and greedy techni…
跳跃游戏
Solve the Jump Game problem using state transition dynamic programming to determine if you can reach the last index of t…
买卖股票的最佳时机 II
Maximize stock profit by using a greedy approach to buy and sell multiple times, with state transition dynamic programmi…
加油站
The Gas Station problem requires finding the starting station index for a full circular trip with gas stations and costs…
分发糖果
The Candy problem is a greedy algorithm challenge where you need to minimize candy distribution while satisfying certain…
最大数
The problem asks to arrange integers to form the largest possible number, focusing on greedy algorithms and string handl…
去除重复字母
Remove duplicate letters from a string to produce the lexicographically smallest result using stack-based state manageme…
拼接最大数
Create Maximum Number involves merging digits from two arrays while preserving order, maximizing the resulting number.
摆动排序 II
Rearrange an array in a way that every odd-indexed element is greater than its adjacent even-indexed elements.
按要求补齐数组
Patching Array requires adding the minimum numbers to cover all sums from 1 to n using greedy choices and invariant chec…
递增的三元子序列
Identify if an array contains a strictly increasing triplet by maintaining a running minimal and middle value efficientl…
摆动序列
Find the longest wiggle subsequence in an integer array using state transition dynamic programming with greedy optimizat…
整数替换
Find the minimum number of operations to reduce a number to 1 by applying specific operations, using state transition dy…
移掉 K 位数字
Remove K Digits requires selecting which digits to drop using a monotonic stack for the smallest possible integer result…
最长回文串
Determine the length of the longest palindrome constructible from a given string using greedy counting and frequency tra…
分割数组的最大值
Solve the 'Split Array Largest Sum' problem by minimizing the largest sum across k subarrays using dynamic programming a…
强密码检验器
The Strong Password Checker problem challenges you to optimize password strength while minimizing steps using greedy alg…
无重叠区间
Determine the minimum number of intervals to remove from a list to ensure no intervals overlap using dynamic programming…
用最少数量的箭引爆气球
Find the minimum number of arrows needed to burst all balloons by considering greedy choice and invariant validation.
分发饼干
Maximize content children by assigning at most one cookie per child using two-pointer scanning and greedy sorting techni…
IPO
Maximize total capital by selecting up to k projects, based on initial capital and project profits using a greedy strate…
超级洗衣机
Calculate the minimum moves to balance dresses across washing machines using a greedy strategy and invariant validation …
swap_vert在题库框内继续向下滚动,也会自动续载