FastPrepRandom Points Inside One Arc
Problems/Random Points Inside One Arc

Random Points Inside One Arc

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

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A report from January 2025 on a 30-minute first-round HR phone screen for a SIG quant research internship includes this question. Three points are picked at random on a circle, and you find the chance that they form an obtuse triangle. The author notes that this is the same as the chance that all three lie in one half of the circle. The report gives no other settings, limits or precision.

Here, the question is widened to n points (1 to 20) and an arc of any whole-number length up to the circle's whole-number circumference (at most 10^6). You find the chance that some arc of that length holds every point. The interview case, three points and half the circle, is the first example. Answers within 10^-9 (absolute or relative) are accepted.

Our version is about 75% the same as the reported question.

You pick n points on a circle whose circumference is circle. Each point is chosen uniformly at random along the circle, independently of the others.

Return the probability that there is an arc of length arc that contains all n points. An arc is a connected piece of the circle, and its two ends count as inside it.

For example, three points form an obtuse triangle exactly when all three fit in one half of the circle, so n = 3, arc = 1, circle = 2 gives the chance of an obtuse triangle.

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

Function

allInOneArcProbability(n: int, arc: int, circle: int) → double

Examples

Example 1

n = 3arc = 1circle = 2return = 0.75

This is the interview case: the arc is half the circle. A triangle whose corners lie on a circle is obtuse exactly when the center of the circle is outside it, which happens exactly when the three corners fit in one half of the circle.

For each point, the chance that the other two land in the half circle that starts at it and runs clockwise is 1/2 × 1/2 = 1/4. These events cannot happen for two different points at once, so the chances add up: 3 × 1/4 = 3/4.

Example 2

n = 2arc = 1circle = 4return = 0.5

Two points fit in a quarter of the circle when the shorter way around between them is at most a quarter of the circle. That shorter distance is uniform between 0 and half the circle, so the chance is (1/4) / (1/2) = 1/2.

Example 3

n = 4arc = 2circle = 3return = 0.9629629629629629

The arc covers two thirds of the circle, so the points fail to fit only when every one of the four gaps between neighboring points is shorter than a third of the circle.

The chance that one chosen gap is at least a third is (2/3)^3 = 8/27, and the chance that two chosen gaps both are is (1/3)^3 = 1/27. So the chance that some gap is that long is 4 × 8/27 - 6 × 1/27 = 26/27, about 0.963.

Constraints

  • 1 <= n <= 20
  • 1 <= arc <= circle <= 10^6

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

  • Meeting of Points Moving Toward Initial SuccessorsThe Walt Disney Company · PHONE SCREENThe Walt Disney Company interview questions
  • Point Inside a TriangleSambaNova Systems · PHONE SCREEN · ONSITE INTERVIEWSambaNova Systems interview questions
  • Count Array DerangementsInMobi · PHONE SCREENInMobi interview questions
  • Light Source Hits: Sample, Compare, and FitOpenAI · PHONE SCREENOpenAI interview questions
  • Biased Coin: Probability of Exactly h HeadsAkuna Capital · PHONE SCREENAkuna Capital interview questions
  • Range of a Third CorrelationTower Research Capital · PHONE SCREEN
  • Probability of Consecutive HeadsSquarepoint Capital · PHONE SCREENSquarepoint Capital interview questions
  • Expected Fake-Name CollisionsMercor · PHONE SCREENMercor interview questions
  • Max Points on a LineUber · PHONE SCREENUber interview questions
  • Count Axis-Aligned and Rotated SquaresGoogle · PHONE SCREENGoogle 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 allInOneArcProbability(int n, int arc, int circle) {
        // Write your code here.
    }
}
Checking account…