Calculate Triangle Probability From Broken Stick
ByteDanceData Scientist · Technical ScreenLast updated
This question evaluates a candidate's understanding of geometric probability, continuous random variables, and spatial reasoning within probabilistic models.
A stick of length 1 is broken into three pieces by choosing two cut points independently and uniformly at random along the stick, then sorting the two cut points to form three segment lengths.
What is the probability that the three resulting pieces can form a valid triangle?
State your assumptions clearly and derive the probability.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.