FastPrepRandom Chord Length on a Circle
Problems/Random Chord Length on a Circle

Random Chord Length on a Circle

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

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Three reports from SIG screening rounds for quant research roles ask for the average distance between two random points on a circle. A report from March 2024 (internship, HR round after the OA) makes clear that both points are uniform on the edge of a circle of radius 1, and gives the answer 4/π. A report from October 2022 (new grad, phone round) and a report from September 2021 (new grad, first technical round) ask the same thing without saying whether the points sit on the edge or inside. The 2021 author found one integral the hard part.

Here, both points are uniform on the edge. The radius r (1 to 1000) and a power k (1 to 50) are inputs, and the answer is the average of the distance raised to the power k. k = 1 with r = 1 is the interview question and the first example. k = 2 gives the average squared distance, which leads to the variance. Answers within 10^-9 (absolute or relative) are accepted.

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

Two points are chosen on the edge of a circle of radius r. Each point is uniformly random on the edge, and the two choices are independent. Let d be the straight-line distance between them, which is the length of the chord joining them.

Return the expected value of d^k, that is, the average of the distance raised to the power k.

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

Function

expectedChordPower(r: int, k: int) → double

Examples

Example 1

r = 1k = 1return = 1.2732395447351628

This is the interview question. Turn the circle so the first point is fixed. The angle θ between the two points, measured at the center, is then uniform from 0 to 2π.

The two radii and the chord form an isosceles triangle, so the chord is d = 2 sin(θ/2) when r = 1. Its average is (1 / 2π) × ∫ 2 sin(θ/2) dθ over 0 to 2π, which is (1 / 2π) × 8 = 4/π, about 1.2732.

Example 2

r = 1k = 2return = 2.0

Now d^2 = 4 sin²(θ/2) = 2 - 2 cos θ. The average of cos θ over a full turn is 0, so the answer is exactly 2.

With example 1, the variance of the distance is 2 - (4/π)^2 = 2 - 16/π^2, about 0.3789.

Example 3

r = 3k = 3return = 91.67324722093171

Write u = θ/2, which is uniform from 0 to π. Then d = 6 sin u, so d^3 = 216 sin³ u.

The average of sin³ u over that range is 4/(3π), so the answer is 216 × 4/(3π) = 288/π, about 91.673.

Constraints

  • 1 <= r <= 1000
  • 1 <= k <= 50

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

  • Integers With Multiple Sum of Two CubesCharta Health · PHONE SCREEN · ONSITE INTERVIEWCharta Health interview questions
  • Dice-Walk Winning ProbabilityGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Logistic Regression with Gradient DescentYahoo · PHONE SCREENYahoo interview questions
  • Evaluate an Arithmetic Expression Written in WordsBrex · PHONE SCREEN
  • Constant-Time Weighted Pick with an Alias TableEtched · PHONE SCREEN
  • Integer to English Words in USD and INR StylesVeeam · PHONE SCREEN
  • Adaptive Calibration ErrorOpenAI · PHONE SCREENOpenAI interview questions
  • Sum of Smallest Non-DivisorsThe D.E. Shaw Group · PHONE SCREENThe D.E. Shaw Group interview questions
  • Square Root FunctionCitadel · PHONE SCREENCitadel interview questions
  • Reorderable Task Scheduler With CooldownWaymo · PHONE SCREENWaymo 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 expectedChordPower(int r, int k) {
        // Write your code here.
    }
}
Checking account…