Exact-Sixty Dice Game Value
Updated
Problem statement
Choose one available fair die and roll it once. A die with s sides has equally likely integer faces from 1 through s. The roll costs 1, and rolling exactly 60 pays 100.
Return the side count with the greatest exact expected net value as side|numerator/denominator, where the reduced fraction is also the fair midpoint for the round. Ties choose the smaller side count. Dice with fewer than 60 sides can never win the payout and therefore have net value -1/1.
Function
bestExactSixtyDie(sideCounts: int[]) → StringExamples
Example 1
sideCounts = [10,20,30,40,50,60,70,80,90,100]return = "60|2/3"The 60-sided die has net expectation 100/60 - 1 = 2/3, larger than every other available die.
Example 2
sideCounts = [6,20,50]return = "6|-1/1"No die can roll 60, so every option has net value -1 and the smallest side count wins the tie.
Constraints
1 <= sideCounts.length <= 10^5.1 <= sideCounts[i] <= 10^9.- Side counts may repeat.
More Jane Street interview questions
- Code Editor FoldingONSITE INTERVIEW · Seen Oct 2026
- Expected Value of Modified DiceONSITE INTERVIEW · Seen Oct 2026
- Spaceship Equipment LoadoutONSITE INTERVIEW · Seen Oct 2026
- Two-Tower Strategy GameONSITE INTERVIEW · Seen Oct 2026
- Wizard Scroll Allocation StrategyONSITE INTERVIEW · Seen Oct 2026
- Sort TradesPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
- Order Matching EngineONSITE INTERVIEW · Seen Jul 2026
- Order Book Data ValidationONSITE INTERVIEW · Seen Nov 2025
- Biggest Daily Move and Longest Rising StreakOA · ONSITE INTERVIEW · Seen Apr 2021
- Maximum-Scoring Consecutive Tree LevelsPHONE SCREEN · Seen Nov 2026
Similar questions at other companies
- Confusing Bib NumbersVerily · ONSITE INTERVIEW
- Plus OneDruva · ONSITE INTERVIEW
- Rotate a Flat Image ClockwiseGoogle · ONSITE INTERVIEWGoogle interview questions
- Matrix MultiplicationeBay · ONSITE INTERVIEWeBay interview questions
- Maximum Product of Three IntegersPelatro · ONSITE INTERVIEW
- Find the Missing Number from 1 to nHyperVerge · ONSITE INTERVIEW
- Alternating Index Square SumAccenture · ONSITE INTERVIEWAccenture interview questions
- Moving Cost by Volume and CategoryWayfair · ONSITE INTERVIEWWayfair interview questions
- Add One to a Number Represented as DigitsOracle · ONSITE INTERVIEWOracle interview questions
- Streaming Entropy, Part 1: Batch EntropyOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
Jane Street interview experiences
- Jane Street TDO UK and Hong Kong: 22 Experiences (Part 10 of 10)
- Jane Street TDOE US Final Round: 11 Experiences (Part 5 of 10)
- Jane Street TDO Phone Math Round: 26 Experiences (Part 9 of 10)
- Jane Street TDOE UK Phone Screen: 15 Experiences (Part 4 of 10)
- Jane Street TDO Excel and VBA Test: 23 Experiences (Part 8 of 10)
- Jane Street TDOE UK Coding Round: 15 Experiences (Part 3 of 10)