Expected Presses to Get DDDD
Press one of D, O, N, E independently and uniformly at random each time, until four consecutive D's appear. What is the expected number of presses?
Input: none. Output: the exact expected value.
Exa...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
