面试场景
高频考察问题建模、边界条件与口头表达的清晰度。
常见误区
只背模板不解释为什么,容易在追问里失分。
练习策略
每轮练 3-5 题,固定复盘复杂度和可替代解法。
推荐练习顺序
用 Rand7() 实现 Rand10()
Generate uniform random numbers from 1 to 10 using only rand7(), applying rejection sampling for consistent probability …
分汤
Compute the probability that soup A empties before soup B using state transition dynamic programming efficiently.
新 21 点
Calculate the probability Alice reaches at most n points using state transition dynamic programming efficiently.
大样本统计
Calculate minimum, maximum, mean, median, and mode from a large sample represented by an array of counts.
飞机座位分配概率
Calculate the probability that the last passenger sits in their assigned seat using state transition dynamic programming…
两个盒子中球的颜色数相同的概率
Compute the probability that two boxes contain the same number of distinct balls using careful combinatorial and DP meth…