FastPrepSure Profit on a Horse Race
Problems/Sure Profit on a Horse Race

Sure Profit on a Horse Race

Susquehanna International Group (SIG) logoSusquehanna International Group (SIG)● MediumINTERNNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Four reports from SIG phone screens for quant roles mention a betting question about a horse race. A report from March 2019 (internship, first technical phone screen) and a report from October 2018 (new grad, phone rounds) both describe three horses whose $1 tickets return 2, 4 and 6 dollars, and ask how you should bet. The first calls these numbers payouts, and the second calls them profit. A report from June 2019 (new grad, third phone round) gives no numbers, but points out that some way of betting wins no matter which horse finishes first. A report from January 2018 (new grad) only lists it as a well-known horse-race question.

The reports give no limits, do not say what answer is expected, and do not settle whether the $1 stake is included. Here, the payouts (stake included) of 1 to 1000 horses are inputs. The answer is the largest profit per dollar that some split of the stake guarantees, or 0 if none does. The interview numbers are example 1, and the same numbers read as profit on top of the stake are example 2. Answers within 10^-9 (absolute or relative) are accepted.

Our version is about 85% the same as the reported questions.

One or more horses run a race, and exactly one of them wins. A $1 ticket on horse i pays back payouts[i] dollars in total (your dollar included) if that horse wins, and nothing if it loses.

You have one dollar. You may split it across the horses in any way, using fractions of a dollar, and you may also keep some or all of it. A stake of x dollars on a horse works like x tickets, so it pays back x × payouts[i] if that horse wins. Your profit is the money you end with minus the dollar you started with.

Return the largest profit you can guarantee, no matter which horse wins. If no split guarantees a positive profit, the answer is 0: keep the dollar.

Your answer is accepted if its absolute error or its relative error is at most 10^-9.

Function

sureProfitPerDollar(payouts: int[]) → double

Examples

Example 1

payouts = [2,4,6]return = 0.09090909090909091

This is the interview case. Put 6/11 of the dollar on the first horse, 3/11 on the second and 2/11 on the third. Whichever horse wins, you get back 12/11: 6/11 × 2 = 3/11 × 4 = 2/11 × 6 = 12/11. The profit is 1/11, about 0.0909.

No plan does better. A dollar you keep comes back as one dollar. A dollar you spread in these same proportions comes back as 12/11 whichever horse wins, and no other way of splitting the bets guarantees more per dollar staked. Since 12/11 is more than 1, the best plan stakes the whole dollar.

Example 2

payouts = [3,5,7]return = 0.4788732394366197

This is the interview case read the other way: 2, 4 and 6 dollars of profit on top of the $1 stake means payouts of 3, 5 and 7.

Now 1/3 + 1/5 + 1/7 = 71/105. Staking 1/3, 1/5 and 1/7 scaled by 105/71 uses exactly one dollar and pays back 105/71 whichever horse wins. The profit is 34/71, about 0.4789.

Example 3

payouts = [2,3,4]return = 0.0

Here 1/2 + 1/3 + 1/4 = 13/12, which is more than 1. Staking a dollar so that it pays back the same amount whichever horse wins returns only 12/13 of it, a loss, while a dollar you keep stays a dollar. The best plan is not to bet, so the answer is 0.

Constraints

  • 1 <= payouts.length <= 1000
  • 1 <= payouts[i] <= 10^9

More Susquehanna International Group (SIG) Phone Screen questions

  • Dice Sum That Is a Multiple of mPHONE SCREEN · Seen Nov 2026
  • Find Median from Data StreamPHONE SCREEN · Seen Nov 2026
  • Painting Arcs to Nearest Neighbors on a CirclePHONE SCREEN · Seen Sep 2026
  • Filter Movies by Inclusive Year RangePHONE SCREEN · Seen Jul 2026
  • Best Single Reroll for Five DicePHONE SCREEN · Seen Feb 2026
  • Catching the Bus to the MoviePHONE SCREEN · Seen Jan 2026
  • Two Dice Summing to a TargetPHONE SCREEN · Seen Jan 2026
  • Median of Uniform Draws in an IntervalPHONE SCREEN · Seen Oct 2025
  • One Number Is the Average of the Other TwoPHONE SCREEN · Seen Jun 2025
  • Which Coin Pattern Shows Up FirstPHONE SCREEN · Seen May 2025

Similar questions at other companies

  • Square Root FunctionCitadel · PHONE SCREENCitadel interview questions
  • Random Pick with Weight Using Recorded DrawsGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Convex Function MinimizationUber · PHONE SCREENUber interview questions
  • Square Root with Newton IterationGoldman Sachs · PHONE SCREENGoldman Sachs interview questions
  • Minimum of a Convex FunctionRippling · PHONE SCREENRippling interview questions
  • Minimum Full Glasses for an Exact Water VolumeMarshall Wace · PHONE SCREENMarshall Wace interview questions
  • Count Centaur Friend RequestsMeta · PHONE SCREENMeta interview questions
  • Percentile and Boundary QueriesDatadog · PHONE SCREENDatadog interview questions
  • Categorical Sampling with Recorded DrawsMicrosoft · PHONE SCREENMicrosoft interview questions
  • Pressure Chamber Linear InterpolationSpaceX · PHONE SCREENSpaceX interview questions

Interview reports that mention this question

  • SIG Quant Research Intern Interviews: 60 Experiences
  • SIG Quant Researcher New Grad Interviews: 49 Experiences

Susquehanna International Group (SIG) interview experiences

  • SIG Quant Researcher Experienced Hire Interviews: 11 Experiences
  • SIG Quant Researcher Intern Interviews: 1 Experience
  • SIG Quant Second-Round Tech Screen: 1 Experience
All Susquehanna International Group (SIG) interview questionsSee Susquehanna International Group (SIG) hiring insights
Saved
class Solution {
    public double sureProfitPerDollar(int[] payouts) {
        // Write your code here.
    }
}
Checking account…