题库chevron_right分类chevron_right贪心
bolt

贪心

377 道题目
简单: 45中等: 247困难: 85

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

面试场景

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

常见误区

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

练习策略

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

推荐练习顺序

题库

贪心 题库

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

慢加载专题题库

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

hourglass_bottom滚动续载
search
tune难度

当前展示 24 / 377 道题目

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

盛最多水的容器

Find two vertical lines that can form a container with the most water in a given array of heights.

中等
44

通配符匹配

Implement full wildcard pattern matching using '?' and '*' by applying state transition dynamic programming with careful…

困难
45

跳跃游戏 II

Jump Game II requires finding the minimum jumps to reach the end of an array using dynamic programming and greedy techni…

中等
55

跳跃游戏

Solve the Jump Game problem using state transition dynamic programming to determine if you can reach the last index of t…

中等
122

买卖股票的最佳时机 II

Maximize stock profit by using a greedy approach to buy and sell multiple times, with state transition dynamic programmi…

中等
134

加油站

The Gas Station problem requires finding the starting station index for a full circular trip with gas stations and costs…

中等
135

分发糖果

The Candy problem is a greedy algorithm challenge where you need to minimize candy distribution while satisfying certain…

困难
179

最大数

The problem asks to arrange integers to form the largest possible number, focusing on greedy algorithms and string handl…

中等
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.

困难
324

摆动排序 II

Rearrange an array in a way that every odd-indexed element is greater than its adjacent even-indexed elements.

中等
330

按要求补齐数组

Patching Array requires adding the minimum numbers to cover all sums from 1 to n using greedy choices and invariant chec…

困难
334

递增的三元子序列

Identify if an array contains a strictly increasing triplet by maintaining a running minimal and middle value efficientl…

中等
376

摆动序列

Find the longest wiggle subsequence in an integer array using state transition dynamic programming with greedy optimizat…

中等
397

整数替换

Find the minimum number of operations to reduce a number to 1 by applying specific operations, using state transition dy…

中等
402

移掉 K 位数字

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

中等
409

最长回文串

Determine the length of the longest palindrome constructible from a given string using greedy counting and frequency tra…

简单
410

分割数组的最大值

Solve the 'Split Array Largest Sum' problem by minimizing the largest sum across k subarrays using dynamic programming a…

困难
420

强密码检验器

The Strong Password Checker problem challenges you to optimize password strength while minimizing steps using greedy alg…

困难
435

无重叠区间

Determine the minimum number of intervals to remove from a list to ensure no intervals overlap using dynamic programming…

中等
452

用最少数量的箭引爆气球

Find the minimum number of arrows needed to burst all balloons by considering greedy choice and invariant validation.

中等
455

分发饼干

Maximize content children by assigning at most one cookie per child using two-pointer scanning and greedy sorting techni…

简单
502

IPO

Maximize total capital by selecting up to k projects, based on initial capital and project profits using a greedy strate…

困难
517

超级洗衣机

Calculate the minimum moves to balance dresses across washing machines using a greedy strategy and invariant validation …

困难

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

关联高频模式

LeetCode 贪心题型题解:377题训练路线