DEV Community

Cover image for Two Sigma OA 2026 Experience | 105-Minute Assessment with 3 Real Questions (Passed)
interviewshow-cs
interviewshow-cs

Posted on

Two Sigma OA 2026 Experience | 105-Minute Assessment with 3 Real Questions (Passed)

I recently completed the Two Sigma Online Assessment (OA) and successfully passed it. The biggest takeaway from this assessment is that Two Sigma's OA style is quite different from typical big tech coding tests. It is not just about grinding LeetCode problems — it focuses heavily on statistics, mathematical modeling, and implementing analytical solutions correctly.

The assessment lasted 105 minutes with 3 questions. The first two questions were labeled as "approximation solutions," while the third one was categorized as coding. However, the third question was also not a typical LeetCode-style programming problem. Instead, it focused on linear regression, OLS models, and incremental data processing.

The first two questions were relatively familiar if you have reviewed previous Two Sigma OA experiences. Knowing the question patterns beforehand can save a lot of time during the test.

Question 1: Linear Interpolator — Handling Interpolation, Extrapolation, and Edge Cases

The first question was about implementing a Linear Interpolator. Given a set of data points (x, y), the task was to build an interpolation function that returns an estimated y value for any given x.

Although the concept is simple, the problem contains several important edge cases. The solution needs to handle three scenarios:

  • Interpolation when the query x falls between existing data points
  • Extrapolation when x is outside the given range
  • Multiple data points sharing the same x coordinate

My approach was to first sort all points by their x values. During each query, I used binary search to locate the correct position and then handled different cases separately.

For interpolation, the formula is:

y = y₁ + (x - x₁) / (x₂ - x₁) × (y₂ - y₁)

For extrapolation, the slope between the two boundary points was extended beyond the existing range.

The trickiest part was handling duplicate x values. Many solutions only consider normal cases and forget that multiple points can have identical x coordinates. This type of edge case is exactly where hidden test cases usually fail.

Question 2: Linear Regression — Mainly Testing Statistical Formula Knowledge

The second question was Linear Regression. Compared with traditional algorithm questions, this problem was closer to a statistics implementation exercise.

The question contained multiple subparts, including:

  • Standard deviation calculation
  • Median calculation
  • Linear regression slope calculation
  • Finding the best single feature predictor
  • Finding the best pair of features
  • Selecting the best multi-variable feature set

The main challenge was not algorithm design, but remembering the formulas correctly.

For linear regression, the key formula is:

β = Cov(X,Y) / Var(X)

The feature selection parts were mainly based on comparing correlation values or model performance metrics such as R².

This problem does not require advanced data structures. The most common mistakes are incorrect formulas, missing preprocessing steps, and floating-point precision issues.

Question 3: Univariate OLS Regression — OLS Formula and Incremental Updates

The third question was Univariate OLS Regression, which was the most coding-oriented problem in the assessment. However, it was still heavily based on statistics.

The first part provided two dataframes and required calculating regression coefficients between different column pairs.

The standard Ordinary Least Squares (OLS) formulas were:

β = Σ(xᵢ - x̄)(yᵢ - ȳ) / Σ(xᵢ - x̄)²

α = ȳ - β × x̄

The second part was more interesting. Instead of receiving all data at once, new batches of data arrived continuously. The task was to update the regression parameters without recalculating everything from scratch.

The key idea was maintaining cumulative statistics:

  • n — number of samples
  • ΣX — sum of all X values
  • ΣY — sum of all Y values
  • ΣX² — sum of squared X values
  • ΣXY — sum of X multiplied by Y

After each batch arrived, these values were updated and the regression parameters were recalculated:

β = (n·ΣXY - ΣX·ΣY) / (n·ΣX² - (ΣX)²)

α = (ΣY - β·ΣX) / n

This approach allows each new batch to be processed efficiently without rerunning the entire dataset, which matches real-world streaming data scenarios.

Final Thoughts: Two Sigma OA Tests More Than Just Coding Skills

Overall, the biggest challenge of Two Sigma's OA is not algorithm complexity. The assessment focuses more on whether you can correctly translate mathematical models into working code.

The first two questions become much easier if you are familiar with statistics formulas beforehand. For the third question, understanding OLS and incremental computation is the key.

If you are preparing for quantitative companies like Two Sigma, Citadel, or Jane Street, do not only focus on LeetCode. Reviewing probability, statistics, regression models, and data processing concepts can make a huge difference.

Many problems may look like coding questions, but they are actually testing whether you can implement mathematical ideas accurately.

Preparation Resources

For candidates preparing for quantitative company OAs, I also used interviewshow for mock practice and interview preparation. The simulations helped me become more familiar with the question style and identify weak areas before the actual assessment.

Hopefully this Two Sigma OA 2026 experience helps others preparing for similar quantitative interviews. Good luck with your OA and future offers!

Top comments (0)