PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Jane Street

Two Opaque Boxes: Place or Take for Maximum Expected Payoff

Last updated: Jul 2, 2026

Two Opaque Boxes: Place or Take for Maximum Expected Payoff

Company: Jane Street

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

You are playing a one-player game with two opaque boxes, both of which start empty. The game lasts exactly 100 turns, and on every turn you must choose one of the following two actions: - **Place**: a third party puts \$1 into one of the two boxes, chosen uniformly at random. (This money is not yours yet — it just sits in the box.) - **Take**: one of the two boxes is chosen uniformly at random; you receive all of the money currently inside that box, and the box is emptied. The boxes are opaque: you can never see how much money is in either box, and you do not learn how much money you have collected until the game is over. In other words, you receive no feedback during the game, so your decisions cannot depend on any observed outcomes. Assuming optimal play, what is the expected total payoff of this game? Describe the optimal strategy (which turns should be Place and which should be Take, and in what order) and compute the exact expected value it achieves.

Related Interview Questions

  • Collapsible Code Editor: Brace Matching and Toggle - Jane Street (medium)
  • Implement a Circular Buffer - Jane Street (medium)
  • Code Editor with Block Shrink and Expand (Code Folding) - Jane Street (medium)
  • Optimize trade PnL table updates - Jane Street (hard)
  • Transform sparse time-code stream to dense rows - Jane Street (easy)
|Home/Coding & Algorithms/Jane Street

Two Opaque Boxes: Place or Take for Maximum Expected Payoff

Jane Street logo
Jane Street
Aug 3, 2025, 12:00 AM
mediumData ScientistOnsiteCoding & Algorithms
0
0

You are playing a one-player game with two opaque boxes, both of which start empty. The game lasts exactly 100 turns, and on every turn you must choose one of the following two actions:

  • Place : a third party puts $1 into one of the two boxes, chosen uniformly at random. (This money is not yours yet — it just sits in the box.)
  • Take : one of the two boxes is chosen uniformly at random; you receive all of the money currently inside that box, and the box is emptied.

The boxes are opaque: you can never see how much money is in either box, and you do not learn how much money you have collected until the game is over. In other words, you receive no feedback during the game, so your decisions cannot depend on any observed outcomes.

Assuming optimal play, what is the expected total payoff of this game? Describe the optimal strategy (which turns should be Place and which should be Take, and in what order) and compute the exact expected value it achieves.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Jane Street•More Data Scientist•Jane Street Data Scientist•Jane Street Coding & Algorithms•Data Scientist Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.