题库chevron_right分类chevron_right组合数学
label

组合数学

49 道题目
简单: 3中等: 14困难: 32

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

面试场景

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

常见误区

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

练习策略

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

推荐练习顺序

题库

组合数学 题库

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

慢加载专题题库

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

hourglass_bottom滚动续载
search
tune难度

当前展示 24 / 49 道题目

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

不同路径

Calculate the number of unique paths for a robot to move on an m x n grid with only right and down movements.

中等
458

可怜的小猪

Find the minimum number of pigs required to determine the poisonous bucket within a set time using state transition dyna…

困难
920

播放列表的数量

Solve the Number of Music Playlists problem with dynamic programming, focusing on state transitions and combinatorics to…

困难
1201

丑数 III

Find the nth positive integer divisible by a, b, or c using binary search over the answer space efficiently and accurate…

中等
1359

有效的快递序列数目

Count all valid pickup and delivery sequences for n orders where deliveries occur after pickups using dynamic programmin…

困难
1467

两个盒子中球的颜色数相同的概率

Compute the probability that two boxes contain the same number of distinct balls using careful combinatorial and DP meth…

困难
1569

将子数组重新排序得到同一个二叉搜索树的方案数

Determine the number of ways to reorder an array to get the same binary search tree (BST) from its insertion order.

困难
1621

大小为 K 的不重叠线段的数目

Count all valid arrangements of k non-overlapping line segments on n points using state transition dynamic programming.

中等
1641

统计字典序元音字符串的数目

Calculate the number of length-n strings with vowels only that are sorted lexicographically using state transitions.

中等
1643

第 K 条最小指令

Find the kth smallest lexicographic instruction sequence for reaching a destination in a grid using state transition dyn…

困难
1735

生成乘积数组的方案数

Determine the number of arrays of size n where the product equals k using prime factorization and combinatorial DP techn…

困难
1830

使字符串有序的最少操作次数

Calculate the minimum operations to sort a string using combinatorial math and string manipulation techniques efficientl…

困难
1863

找出所有子集的异或总和再求和

Compute the sum of all subset XOR totals using a backtracking search with pruning for arrays of small size.

简单
1866

恰有 K 根木棍可以看到的排列数目

Calculate the number of arrangements of n uniquely-sized sticks so exactly k sticks are visible using dynamic programmin…

困难
1916

统计为蚁群构筑房间的不同顺序

Solve the problem of counting distinct ways to build rooms in an ant colony using dynamic programming and topological or…

困难
2063

所有子字符串中的元音

Compute the total number of vowels in all substrings of a given string using efficient state transition dynamic programm…

中等
2221

数组的三角和

The problem asks for calculating the triangular sum of an array through repeated pairwise summation.

中等
2338

统计理想数组的数目

This problem involves counting the number of ideal arrays of a given length under certain conditions using state transit…

困难
2400

恰好移动 k 步到达某一位置的方法数目

Find the number of ways to reach a position after exactly k steps on an infinite number line using dynamic programming.

中等
2514

统计同位异构字符串数目

Learn to count distinct anagrams for a multi-word string using hash tables, math, and combinatorics efficiently.

困难
2597

美丽子集的数目

Count all non-empty subsets of an array where no two numbers have an absolute difference equal to k, using array scannin…

中等
2842

统计一个字符串的 k 子序列美丽值最大的数目

Determine the number of k-length unique subsequences in a string that maximize the sum of character frequencies efficien…

困难
2928

给小朋友们分糖果 I

Given two integers n and limit, find the number of ways to distribute n candies among 3 children, with no child receivin…

简单
2929

给小朋友们分糖果 II

Determine how to distribute n candies among 3 children without exceeding a limit on individual candies.

中等

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

关联高频模式

LeetCode 组合数学题型题解:49题训练路线