Skip to main content
All Questions

You roll a die repeatedly and may cash in the running total at any time, but you lose everything if it ever lands on a perfect square. When should you stop?

Unlock detailed company stats for this questionUpgrade
You roll a fair six-sided die repeatedly and keep a running total, which you may cash in at any time. If the running total ever hits a perfect square (1, 4, 9, 16, ...) you lose everything. What is the optimal strategy for when to stop?

Community answers

No answers contributed by the community yet.

Related courses

Course

SQL Interview Prep Course

Prepare for SQL interviews with lessons on joins, aggregations, and window functions, then practice real SQL interview questions in an interactive editor with expert solutions.

Course

Data Science Interview Prep

Land your dream data science role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Practice statistics, experimentation, coding, SQL, machine learning, behavioral interviews, and more.