Two Sigma Coding & Algorithms Interview Questions

Practice the exact questions companies are asking right now.

34 Questions 1 Company07.31.2026
Showing 20 results
Role
Two Sigma logo
Two Sigma
Medium
Software Engineer

Match Limit Orders with Price-Time Priority

Implement an in-memory limit-order matcher that processes orders in arrival order and returns both the executed trades and the final resting order boo...

Coding & Algorithms
6
0
41 people solved
Jul 31, 2026
Two Sigma logo
Two Sigma
Medium
Software EngineerNew Grad

Allocate IPO Shares and Split a Weighted Tree

Two Allocation and Tree Problems Implement both independent parts. Part A - IPO Share Allocation Each bid is [user_id, requested_shares, price, timest...

Coding & Algorithms
3
0
50 people solved
Jun 28, 2026
Two Sigma logo
Two Sigma
Easy
Data Scientist

Match readings with latest same-city humidity

Problem You are given two time-sorted lists of sensor readings: - Temperature records: (time, city, reading) - Humidity records: (time, city, reading)...

Coding & Algorithms
15
1
170 people solved
Dec 15, 2025
Two Sigma logo
Two Sigma
Medium
Software Engineer Locked

Implement Price-Time Order Matching

This question evaluates understanding of limit-order book mechanics, priority-based matching, stateful stream processing, and data-structure managemen...

Coding & Algorithms
5
0
35 people solved
May 9, 2026
Two Sigma logo
Two Sigma
Hard
Software Engineer

Implement an In-Memory Database

Implement a simple in-memory relational database that processes a sequence of tokenized commands. You are given commands: List[List[str]], where each ...

Coding & Algorithms
6
0
46 people solved
Apr 2, 2026
Two Sigma logo
Two Sigma
Hard
Data ScientistIntern Locked

Merge two sorted linked lists

This question evaluates proficiency with linked list data structures, pointer manipulation, in-place merging concepts, and algorithmic efficiency with...

Coding & Algorithms
4
0
51 people solved
Apr 2, 2026
Two Sigma logo
Two Sigma
Easy
Data Scientist Locked

Merge two sorted lists

This question evaluates a candidate's competency in array manipulation and merging algorithms, emphasizing understanding of ordered data and time comp...

Coding & Algorithms
4
0
69 people solved
Feb 13, 2026
Two Sigma logo
Two Sigma
Hard
Data Scientist Locked

Merge Two Sorted Lists

This question evaluates proficiency with linked list data structures, pointer manipulation, in-place merging of sorted sequences, and general algorith...

Coding & Algorithms
10
0
68 people solved
Mar 18, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist Locked

Evaluate Piecewise Linear Function

This question evaluates understanding of piecewise linear interpolation, numerical reasoning, and the ability to handle ordered 2D point data and edge...

Coding & Algorithms
4
0
48 people solved
Mar 3, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist

Compute Piecewise Linear Interpolation

You are given an unsorted list of distinct 2D points (x_i, y_i). When the points are sorted by x_i, connecting adjacent points forms a polyline. Given...

Coding & Algorithms
1
0
11 people solved
Apr 21, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist Locked

Maximize profit from one stock trade

This question evaluates algorithmic problem-solving skills with emphasis on array processing, numeric optimization, and time/space complexity analysis...

Coding & Algorithms
7
1
113 people solved
Jan 22, 2026
Two Sigma logo
Two Sigma
Medium
Software Engineer

Implement a Hash Map with Separate Chaining and Resizing

Implement a hash map data structure from scratch, without using any built-in hash table types from your language's standard library (no dict, HashMap,...

Coding & Algorithms
0
0
8 people solved
Aug 26, 2025
Two Sigma logo
Two Sigma
Medium
Data Scientist

Implement merge sort and largest 1-rectangle

The coding round included two algorithm questions: 1. Implement merge sort for an array of integers. Return the sorted array and explain its time and ...

Coding & Algorithms
7
0
53 people solved
Feb 26, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist Locked

Return sorted values after quadratic transform

This question evaluates understanding of mathematical transformations and array manipulation, specifically how applying a quadratic function affects t...

Coding & Algorithms
4
0
69 people solved
Jan 22, 2026
Two Sigma logo
Two Sigma
Medium
Data ScientistIntern

Linear Interpolator with Extrapolation

Linear Interpolator with Extrapolation You are given n knot points in a 2D coordinate system, where knots[i] = [x_i, y_i]. All x-coordinates are disti...

Coding & Algorithms
8
0
57 people solved
Sep 10, 2025
Two Sigma logo
Two Sigma
Hard
Data Scientist Locked

Add two integer strings using digit-adder

This question evaluates proficiency in string-based arithmetic, digit-wise addition, carry propagation, and management of arbitrarily large non-negati...

Coding & Algorithms
6
0
53 people solved
Jan 6, 2026
Two Sigma logo
Two Sigma
Hard
Data Scientist

Expected Number of Good Pairs in a Randomly Weighted Complete Graph

Expected Number of Good Pairs in a Randomly Weighted Complete Graph You are given a complete graph on n vertices — every pair of distinct vertices is ...

Coding & Algorithms
0
0
8 people solved
Dec 2, 2025
Two Sigma logo
Two Sigma
Hard
Data Scientist

Smallest Palindrome Strictly Greater Than K

A palindrome is a positive integer whose decimal representation reads the same forwards and backwards, with no leading zeros. For example, 7, 44, 121,...

Coding & Algorithms
0
0
7 people solved
Nov 28, 2025
Two Sigma logo
Two Sigma
Easy
Data Scientist

Median, Variance, and Linear Trend of a Daily Temperature Dataset

Median, Variance, and Linear Trend of a Daily Temperature Dataset You are given n daily temperature readings collected in New York City. The data is a...

Coding & Algorithms
0
0
7 people solved
May 13, 2025
Two Sigma logo
Two Sigma
Easy
Data Scientist

Fill Missing Time-Series Values with Linear Interpolation (Duplicate Timestamps Allowed)

Fill Missing Time-Series Values with Linear Interpolation (Duplicate Timestamps Allowed) You are given readings from a single sensor as a list of reco...

Coding & Algorithms
0
0
5 people solved
May 13, 2025

Explore more Two Sigma Coding & Algorithms interview questions

Real questions from candidate reports, grouped by role, topic and company.

By role
Other categories at Two Sigma
Coding & Algorithms questions at other companies
Browse all