FastPrepCorrect Three Protractor Readings
Problems/Correct Three Protractor Readings

Correct Three Protractor Readings

Susquehanna International Group (SIG) logoSusquehanna International Group (SIG)● EasyINTERNONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: In an onsite round, the candidate got three protractor readings of one triangle's angles whose total falls short of 180 degrees, and was asked to estimate the actual angles under a model of their own choosing. The interview readings are the first example.

The report does not say which error model the interviewer wanted or what form the answer should take. Here, the reading errors are independent with mean 0 and equal variance. The answer is the least-squares fix that adds up to exactly 180. The corrected angles are returned in the same order as the readings. Readings are whole degrees from 11 to 169 that add up to 150 to 210. Answers within 10^-9 (absolute or relative) are accepted.

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

You measure the three angles of a triangle with a protractor. The readings, in degrees, are measured[0], measured[1] and measured[2]. The true angles of a triangle always add up to exactly 180 degrees, but the readings may not.

Assume each reading equals its true angle plus a random error. The three errors are independent, each has mean 0, and all three have the same variance.

Estimate the true angles with the least-squares fix: find the three numbers t[0], t[1] and t[2] that add up to exactly 180 and make (measured[0] - t[0])^2 + (measured[1] - t[1])^2 + (measured[2] - t[2])^2 as small as possible.

Return [t[0], t[1], t[2]], in the same order as the readings. Each value is accepted if its absolute error or its relative error is at most 10^-9.

Function

correctTriangleAngles(measured: int[]) → double[]

Examples

Example 1

measured = [56,55,57]return = [60.0,59.0,61.0]

This is the interview case. The readings add up to 56 + 55 + 57 = 168, which is 12 degrees short of 180. The errors have the same variance, so the fix spreads the missing 12 degrees equally: each angle gets 12 / 3 = 4 more degrees. The answer is [60, 59, 61], which adds up to 180.

Example 2

measured = [60,60,60]return = [60.0,60.0,60.0]

The readings already add up to 180, so nothing needs to change. The answer is [60, 60, 60].

Example 3

measured = [100,41,40]return = [99.66666666666667,40.666666666666664,39.666666666666664]

The readings add up to 181, which is 1 degree too much. Each angle gives back 1 / 3 of a degree. The answer is [99 2/3, 40 2/3, 39 2/3], about [99.6667, 40.6667, 39.6667].

Constraints

  • measured.length == 3
  • 11 <= measured[i] <= 169
  • 150 <= measured[0] + measured[1] + measured[2] <= 210

More Susquehanna International Group (SIG) interview questions

  • Extract Company Tickers from NewsONSITE INTERVIEW · Seen Jul 2026
  • AKQ Betting Game EquilibriumONSITE INTERVIEW · Seen May 2025
  • Estimate X from the Sum of Two NormalsONSITE INTERVIEW · Seen May 2025
  • Catch Fish with Reusable BaitsOA · Seen Nov 2026
  • Bold Play to Reach a GoalOA · Seen Nov 2026
  • Cats, Truth and Who Has MoreOA · Seen Nov 2026
  • Counting Cows by Their LegsOA · Seen Nov 2026
  • Enough Muffins for the LineOA · Seen Nov 2026
  • Expected Consecutive Pairs Among Chosen NumbersOA · Seen Nov 2026
  • Four-by-Four Boundary GridOA · Seen Nov 2026

Similar questions at other companies

  • Rectangle OverlapMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Overlap Area of Two RectanglesNutanix · ONSITE INTERVIEWNutanix interview questions
  • Common Part of Two RectanglesExpedia · ONSITE INTERVIEWExpedia interview questions
  • Optimal Central WarehouseGoogle · ONSITE INTERVIEWGoogle interview questions
  • Max Points on a LineLinkedIn · ONSITE INTERVIEWLinkedIn interview questions
  • Rasterize a Circle with Integer PixelsPure Storage · ONSITE INTERVIEWPure Storage interview questions
  • Point Inside a TriangleSambaNova Systems · PHONE SCREEN · ONSITE INTERVIEWSambaNova Systems interview questions
  • Circle Intersection in Three DimensionsNVIDIA · ONSITE INTERVIEWNVIDIA interview questions
  • Range of a Third CorrelationTower Research Capital · PHONE SCREEN
  • Three Points in a Semicircle: Monte Carlo EstimateSquarepoint Capital · PHONE SCREENSquarepoint Capital interview questions

Interview reports that mention this question

  • SIG Quant Research Intern Interviews: 60 Experiences

Susquehanna International Group (SIG) interview experiences

  • SIG Quant Researcher Experienced Hire Interviews: 11 Experiences
  • SIG Quant Researcher New Grad Interviews: 49 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[] correctTriangleAngles(int[] measured) {
        // Write your code here.
    }
}
Checking account…