面试场景
高频考察问题建模、边界条件与口头表达的清晰度。
常见误区
只背模板不解释为什么,容易在追问里失分。
练习策略
每轮练 3-5 题,固定复盘复杂度和可替代解法。
推荐练习顺序
题库
组合数学 题库
先展示一段最适合快速浏览的题目列表,继续滚动时再慢慢续载,避免专题页被长列表一下子拉穿。
慢加载专题题库
适合这类题很多的专题,先扫结构,再逐步深入。
当前展示 24 / 49 道题目
每次续载 24 题不同路径
Calculate the number of unique paths for a robot to move on an m x n grid with only right and down movements.
可怜的小猪
Find the minimum number of pigs required to determine the poisonous bucket within a set time using state transition dyna…
播放列表的数量
Solve the Number of Music Playlists problem with dynamic programming, focusing on state transitions and combinatorics to…
丑数 III
Find the nth positive integer divisible by a, b, or c using binary search over the answer space efficiently and accurate…
有效的快递序列数目
Count all valid pickup and delivery sequences for n orders where deliveries occur after pickups using dynamic programmin…
两个盒子中球的颜色数相同的概率
Compute the probability that two boxes contain the same number of distinct balls using careful combinatorial and DP meth…
将子数组重新排序得到同一个二叉搜索树的方案数
Determine the number of ways to reorder an array to get the same binary search tree (BST) from its insertion order.
大小为 K 的不重叠线段的数目
Count all valid arrangements of k non-overlapping line segments on n points using state transition dynamic programming.
统计字典序元音字符串的数目
Calculate the number of length-n strings with vowels only that are sorted lexicographically using state transitions.
第 K 条最小指令
Find the kth smallest lexicographic instruction sequence for reaching a destination in a grid using state transition dyn…
生成乘积数组的方案数
Determine the number of arrays of size n where the product equals k using prime factorization and combinatorial DP techn…
使字符串有序的最少操作次数
Calculate the minimum operations to sort a string using combinatorial math and string manipulation techniques efficientl…
找出所有子集的异或总和再求和
Compute the sum of all subset XOR totals using a backtracking search with pruning for arrays of small size.
恰有 K 根木棍可以看到的排列数目
Calculate the number of arrangements of n uniquely-sized sticks so exactly k sticks are visible using dynamic programmin…
统计为蚁群构筑房间的不同顺序
Solve the problem of counting distinct ways to build rooms in an ant colony using dynamic programming and topological or…
所有子字符串中的元音
Compute the total number of vowels in all substrings of a given string using efficient state transition dynamic programm…
数组的三角和
The problem asks for calculating the triangular sum of an array through repeated pairwise summation.
统计理想数组的数目
This problem involves counting the number of ideal arrays of a given length under certain conditions using state transit…
恰好移动 k 步到达某一位置的方法数目
Find the number of ways to reach a position after exactly k steps on an infinite number line using dynamic programming.
统计同位异构字符串数目
Learn to count distinct anagrams for a multi-word string using hash tables, math, and combinatorics efficiently.
美丽子集的数目
Count all non-empty subsets of an array where no two numbers have an absolute difference equal to k, using array scannin…
统计一个字符串的 k 子序列美丽值最大的数目
Determine the number of k-length unique subsequences in a string that maximize the sum of character frequencies efficien…
给小朋友们分糖果 I
Given two integers n and limit, find the number of ways to distribute n candies among 3 children, with no child receivin…
给小朋友们分糖果 II
Determine how to distribute n candies among 3 children without exceeding a limit on individual candies.
swap_vert在题库框内继续向下滚动,也会自动续载