The Two Sigma Online Assessment
- Know the format, scoring and AI rule of the Two Sigma SWE online assessment
- Solve the IPO share allocation with a timestamp sort and a true round robin
- Split the drainage tree with one subtree-sum pass that never recurses
- Practice the two rarer OA problems once the main pair is solid
Most Two Sigma software engineering loops open with an online assessment, usually after the recruiter call. The format is two problems that share one timer, and a current job posting says you must pass the company's required skills assessment. It also barely changes. Candidates in October 2021 described an IPO share allocation and a tree split. Candidates in 2025 and 2026 describe the same two, by name.
The format and the rules come first. Then both problems get worked in runnable Python, with the traps real candidates fell into. Two rarer OA problems come last. Give them an hour once the main pair feels easy. The research and PhD intern OAs are a different test, and they have their own lesson.
What the Two Sigma OA looks like
You get two problems and one clock, and you split the time between them however you like. A July 2026 new grad put it as two problems done together under one time limit. Candidates name HackerRank, in 2022 and again in 2026, while a couple from 2021 to 2023 got CodeSignal. Your invite names the platform you'll get.
Length is the part people get wrong. Reports from 2021 to 2023 put the OA at 75 minutes, and so does a new grad who took it in mid 2025. Two 2025 candidates had 120 minutes, so check the invite for that too. Candidates call the problems long rather than hard. A 2025 candidate said it wasn't difficult, and a 2026 candidate breezed through it. One 2023 candidate spent ten minutes just reading the statements, which is the real time sink.
Language choice is narrower than you might expect. Two Sigma's interviews run in C, C++, Java or Python, and a 2022 candidate found C# and JavaScript weren't offered on the OA. Python is the safe pick for both problems here, since neither needs anything faster.
- Problems: two, on one shared timer.
- Platform: HackerRank in most reports, CodeSignal in a few from 2021 to 2023.
- Length: 75 minutes in most reports from 2021 to 2025, 120 in two from 2025.
- Pass bar: treat a full pass on both problems as the bar.
- AI tools: strictly prohibited.
Is the Two Sigma OA proctored?
No 2025 or 2026 candidate mentions webcam or screen monitoring on the SWE OA, which isn't the same as saying there is none. What Two Sigma does put in writing is the AI ban, and it covers the assessment and every interview after it. Write the code yourself and assume someone may read how you got there.
Is the Two Sigma OA auto-graded?
Yes. Scoring runs on test cases, and candidates talk about results in passed cases. In late 2024 an intern candidate passed every case on the first problem, missed three on the second, and still got a first interview. In June 2026, though, someone who works at Two Sigma wrote that "nowadays you do need 100% to move on", and the newest word is the one to plan around. Aim for every case on both problems.
SWE OA vs the QR OA
The quant research, data science and PhD intern pipelines send a different test. Their OAs are data and statistics work. Candidates describe a Premium question, a regression updated batch by batch, and pandas analysis of daily temperatures by town. The two share nothing with the SWE pair, so prepare for the one your invite names. One September 2025 report does have a machine learning engineer getting the SWE pair, though.
Each of the main pair has one detail that decides the score. For the IPO it's the order inside a tied price, and for the drainage tree it's computing every subtree sum in one pass. Get those two details right and the rest is careful bookkeeping.
The two problems that keep coming back
About a dozen candidates since October 2021 have described the IPO allocation and the drainage split, the newest in June and July 2026. A November 2025 candidate's tip was to prepare hash tables and DFS. That matches the pair well: the IPO groups bids by price, and the drainage tree is a traversal.
IPO share allocation
This is the longer of the two and the one people lose points on. In June 2026 a new grad forgot to sort the tied bidders by timestamp, failed tests, fixed it, and moved to the phone round the next day. In May 2025 another candidate wrote about trouble with the test cases on both problems. The shape below is something like what candidates describe: bids filled from the highest price down, a share-at-a-time round robin inside a tied price, and the ids that got nothing as the answer.
Split the drainage tree
The second problem goes by a few names in posts: drainage, sewer system, split tree. It has been paired with the IPO since 2021. A June 2026 candidate called it a lot easier than the first question and solved it with DFS subtree sums. A November 2025 new grad didn't name their problems, but said one needed a prefix-sum trick to avoid timing out. This is the likely one, since subtree sums are prefix sums on a tree.
Split the Drainage Tree
Problem
n nodes. parent[i] is the node that node i drains into, and the root has parent[root] = -1. flow[i] is the water that enters the network at node i. The flow of a piece of the network is the sum of flow over its nodes.Cut exactly one edge, splitting the tree into two connected pieces. Return the smallest possible absolute difference between the two pieces' flows.
n can be up to 100,000, so the answer has to come from one pass over the tree.The total is 8. Cutting the edge above node 1 separates nodes 1, 3 and 4, which carry 4, leaving 4 on the other side.
Cutting the edge above node v leaves its subtree on one side, so that side carries subtree_sum[v] and the other carries total minus that. Compute every subtree sum in one bottom-up pass and minimize the absolute value of total minus twice the subtree sum.
Split the Drainage Tree
Click "Run" to execute your code
Two rarer OA problems
OAs from October 2025 and August 2026 had a different pair: a bracket string split with wildcards and a pixel color matcher. That's two OAs, a long way from the dozen behind the IPO and drainage problems, so treat them as possible rather than likely. They're short, and they test the same habit of counting carefully.
Balanced Split String With Wildcards
Problem
s made of the characters (, ), [, ] and ?. A ? can stand for any one of the four brackets.Count the ways to cut
s into two non-empty parts, a prefix and a suffix, so that each part can be rearranged into a balanced bracket string. Rearranging means you may reorder a part's characters freely, then choose a bracket for each ? in it.s can be up to 100,000 characters long.Only the middle cut works. "(?" becomes "()" and "?]" becomes "[]". The other two cuts leave a part of odd length.
Because a part can be reordered, only its counts matter. A part works when its length is even and its wildcards cover the round gap plus the square gap. Keep running counts for the prefix and the suffix and check every cut in one pass.
Balanced Split String With Wildcards
Click "Run" to execute your code
Closest Pure Color
Problem
For every pixel, find the nearest of five pure colors by straight-line distance in RGB:
Black (0, 0, 0), White (255, 255, 255), Red (255, 0, 0), Green (0, 255, 0) and Blue (0, 0, 255). Return a list with that color's name for each pixel, or Ambiguous when two or more pure colors tie for nearest.The pixel is (0, 0, 255), which is pure blue.
Slice each string into three 8-bit pieces and parse them in base 2. Compare squared distances to the five colors, so every value stays an integer, and check whether the smallest distance is shared.
Closest Pure Color
Click "Run" to execute your code
How to spend the timer
Read both statements before you write anything. If you get the usual pair, the drainage split is shorter to code, and banking it first leaves the rest of the clock for the IPO's fiddly ordering. Write the IPO from the statement's rules, line by line, and run it against a tied price with shuffled timestamps before you submit.
Common questions
What questions are on the Two Sigma OA?
For software engineers, the IPO share allocation and the drainage tree split have been the pair since 2021, and candidates reported them again through mid 2026. A couple of OAs from October 2025 and August 2026 had a bracket split with wildcards and a pixel color matcher instead.
How long is the Two Sigma online assessment?
Most candidates had 75 minutes for the two problems, from 2021 through mid 2025. Two in 2025 had 120, so go by your invite. Plan on the statements taking real time to read.
Is the Two Sigma OA on HackerRank?
Most candidates got HackerRank, and a few from 2021 to 2023 got CodeSignal. The invite names the platform.
How soon do you hear back?
It varies. A June 2026 new grad got the email moving them to the next round the very next day. After the OA comes a live technical screen, which the process overview walks through.
Key Takeaways
- ✓The Two Sigma SWE OA is two problems on one timer, and the IPO and drainage pair has held since 2021.
- ✓In the IPO problem, sort each tied price by timestamp and hand out one share per turn.
- ✓Split the drainage tree with one iterative subtree-sum pass, then minimize the gap between the total and twice each subtree.
- ✓Aim for every test case on both problems, since a 2026 insider says a full pass is now the bar.
Two Sigma interview guideKnow what Two Sigma asks before you walk in.
21 coding · 4 system design · 13 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.