INTERVIEW PREP

数学与非代码面试题

覆盖数学、概率、统计、脑筋急转弯、机器学习和金融。这里负责筛选和进入单题;编程题使用独立的 LeetCode 式 coding lab。

题目
4169
领域
8
当前筛选
814

7 / 41

非代码面试题

显示 20 / 814 道匹配题目

答题状态:未尝试未正确已正确
139Run of Three or More Heads in Eight FlipsYou flip 8 fair coins. What is the probability that somewhere in the sequence there is a run of at least 3 consecutive heads?概率困难数值题未尝试免费140Three-of-a-Kind Among Five DiceYou roll 5 fair six-sided dice. What is the probability that at least one face value appears exactly 3 times?概率困难数值题未尝试免费141Even Product of Two DiceYou roll two fair six-sided dice. What is the probability that their product is even?概率简单数值题未尝试免费142Exactly Two Sixes in Four DiceYou roll 4 fair six-sided dice. What is the probability that exactly 2 of the 4 dice show a six?概率中等数值题未尝试免费143No Consecutive Heads in Six FlipsYou flip 6 fair coins in sequence. What is the probability that no two consecutive coins land heads?概率中等数值题未尝试免费144All Six Faces Represented in Eight DiceYou roll 8 fair six-sided dice. What is the probability that every face value from 1 to 6 appears at least once among the 8 dice?概率困难数值题未尝试免费145No Face Appears More Than Twice in Six DiceYou roll 6 fair six-sided dice. What is the probability that no face value appears more than twice?概率困难数值题未尝试免费146Heads Beat the DieYou flip 3 fair coins and independently roll a single fair six-sided die. What is the probability that the number of heads strictly exceeds the value shown on the die?概率简单数值题未尝试免费150Red Dice Meet Blue DiceYou simultaneously roll 3 red fair six-sided dice and 3 blue fair six-sided dice. What is the probability that the sum of the red dice equals the sum of the blue dice?概率困难数值题未尝试免费152Expected Draws Until First Birthday MatchPeople enter a room one at a time, each with a birthday drawn independently and uniformly from 365 days. Let T be the number of people present when a birthday collision first occurs (i.e., the newcomer shares a birthday with someone already in the room). Write a closed-form expression for E[T] as a finite sum involving factorials and powers of 365, then approximate it numerically.概率简单数值题未尝试免费153Birthday Collision Probability and Exponential ApproximationFifty people are in a room. Each birthday is independent and uniform on \ 1, 2, \ldots, 365\ . (a) Write the exact probability that at least two share a birthday. (b) Derive a useful upper bound on P( all distinct ) using the inequality 1-x \le e -x and simplify. How does the approximation compare to the exact value?概率中等derivation未尝试免费154Expected Number of Birthday-Collision PairsIn a group of n people whose birthdays are independent and uniform on \ 1,\ldots,365\ , let X be the number of unordered pairs (i,j) with i < j who share a birthday. Using indicator random variables, find E[X]. Then determine the smallest n for which E[X] \ge 1.概率中等derivation未尝试免费155Variance of Birthday-Collision Pair CountContinuing from the setup of the expected collision-pair count: n people have independent uniform birthdays on \ 1,\ldots,d\ . Define X = \sum i<j 1 [B i = B j]. (a) Compute Var (X). (b) A surprising intermediate step: show that Cov ( 1 [B i = B j],\, 1 [B j = B k]) = 0 for distinct i,j,k even though the two indicators share the index j. Explain intuitively why this zero covariance holds. (c) For d = 365 and n = 28, compute Var (X) numerically and give the coefficient of variation \sigma X / E[X].概率困难derivation未尝试面试订阅156Reverse Birthday Problem: Minimum Calendar SizeTwenty-three people have birthdays chosen independently and uniformly from \ 1, 2, \ldots, d\ . What is the smallest d such that the probability of at least one shared birthday is strictly less than 1 2 ?概率简单数值题未尝试免费157Non-Uniform Birthdays Increase Collision ProbabilitySuppose d days have birthday probabilities p 1, p 2, \ldots, p d with \sum j p j = 1 (not necessarily uniform). For n people whose birthdays are independent draws from this distribution: (a) Show that for n = 2, P( collision ) = \sum j=1 d p j 2 \ge 1 d , with equality if and only if all p j = 1 d . (b) Deduce that the uniform distribution minimizes the collision probability among all distributions on d days. Give a one-line intuitive explanation for why non-uniformity helps collisions.概率中等derivation未尝试免费158Triple Birthday Collision ThresholdIn a room of n people with birthdays uniform on \ 1,\ldots,365\ , let A be the event that at least three people share the same birthday. (a) Using a Poisson approximation (model the occupancy of each day as an independent Poisson (n/365) variable), derive an approximate formula for P(A). (b) Find the smallest n such that P(A) \ge 1 2 under this approximation.概率中等数值题未尝试免费159Near-Birthday Problem: Birthdays Within One DayFourteen people have birthdays chosen independently and uniformly on a circular calendar of 365 days (day 1 is adjacent to day 365). Two people have a **near-match** if their birthdays differ by at most 1 day (i.e., they land on the same day or on consecutive days). Let M be the number of unordered near-match pairs. (a) Compute E[M]. (b) Using a Poisson approximation for the probability that M \ge 1, estimate P( at least one near-match ). (c) Contrast with the standard birthday problem: for n = 14 people, what is P( at least one exact match )?概率中等数值题未尝试免费160Expected and Variance of Distinct Birthday CountAmong n people whose birthdays are independent and uniform on \ 1, \ldots, d\ , let D be the number of distinct birthdays observed. (a) Derive E[D] using indicator random variables. (b) Derive Var (D). You will need P( day j and day k both occupied ) for j \ne k. (c) For n = 100 and d = 365, compute E[D], Var (D), and the expected number of "collision people" n - D (people whose birthday coincides with at least one other person). (d) Is E[n - D] the same as the expected number of collision pairs \binom n 2 /d from the indicator-pair approach? Explain the distinction.概率困难derivation未尝试面试订阅161Expected Near-Birthday PairsForty people have independent uniform birthdays on a 365-day circular calendar. What is the expected number of unordered pairs whose birthdays are either the same day or one day apart on the circle?概率简单数值题未尝试免费162Triple-Collision Expectation Above OneIn a 365-day uniform birthday model, what is the smallest n for which the expected number of unordered triples sharing an exact birthday is at least 1?概率简单数值题未尝试免费