Two Sigma Coding Interview Questions
21 coding questions reported by candidates who interviewed at Two Sigma, out of 24 Two Sigma questions we track. They average 3.0/5 difficulty (medium). Most common topics: Medium Difficulty, Twosigma, SWE, RS. 18 were reported asked within the last year, most recently in July 2026.
Practice Two Sigma questions →Difficulty
- 2/5 — easy2
- 3/5 — medium16
- 4/5 — hard3
Asked for SWE (20), Quant (7), DS (7), RS (7)
Reported Two Sigma coding questions
Nums That Are Divisible by N
3/5Solve quantitative algorithmic problems frequently given to prospective interns at firms like Two Sigma. This challenge requires scanning a collection of integers to identify specific index pairs whose combined value is evenly divisible by a given divisor, operating efficiently under strict performance constraints. It tests your mathematical insights and ability to optimize nested loops using modular arithmetic. Access the full problem description, analytical breakdown, and optimal solution code with an active subscription.
asked July 2026InternshipTwosigmaRedundant Connection: Underground Pipes
3/5In this graph theory interview question from Two Sigma, you are given an undirected network representing cities linked by underground pipelines and asked to identify a redundant connection. Removing this specific edge must leave the underlying graph fully connected, and you must return the problematic edge based on its appearance order in the input. This problem tests your mastery of cycle detection and disjoint-set data structures in graph algorithms. To read the complete problem statement, constraints, and view the optimal solution, a subscription is required.
asked July 2026TwosigmaIPO Allocation with Price Group Round-Robin and Timestamp Tie-Breaking
3/5Complex resource distribution challenges frequently appear in quantitative finance interviews, such as this reported problem from Two Sigma. Candidates must distribute limited assets among competing bidders using sophisticated priority rules, price tiering, and chronological tie-breaking mechanisms. This exercise evaluates your proficiency in advanced sorting algorithms, custom comparator logic, and maintaining state across multi-tiered queues. Unlock the complete problem specification and optimal code implementation with an active subscription.
asked July 2026TwosigmaHuffman-Style Binary Encode / Decode
4/5Master data compression techniques by developing a compression and decompression utility inspired by Huffman encoding, previously featured in interviews at Two Sigma. This challenge evaluates your ability to build hierarchical frequency structures and translate textual data into compact bit streams while adhering to precise rules. Candidates must carefully handle tree construction logic and byte manipulations to successfully pass the evaluation. Access the complete problem description and an optimized reference solution with a paid subscription.
asked July 2026SWEHeapTreePiecewise Linear Interpolation and Extrapolation for Polyline
3/5This Two Sigma interview question tests your ability to process geometric data by evaluating continuous coordinate queries against a connected series of segments. Candidates must correctly handle inner segment calculations as well as outer boundary projections using mathematical approximation techniques. You will need to implement efficient lookup logic to process coordinate bounds accurately under various positioning scenarios. Access the complete problem description, edge-case breakdowns, and a fully optimized reference solution by unlocking our comprehensive interview preparation package.
asked July 2026TwosigmaGenerate Permutations with Removed Character
3/5Explore an intriguing string manipulation problem reported in technical interviews at Two Sigma. This task involves omitting a specific character from a given text sequence and subsequently generating all unique rearrangements of the remaining elements in alphabetical order. The challenge evaluates your grasp of combinatorial generation and recursive backtracking techniques. Unlock the comprehensive walkthrough, complexity analysis, and complete reference implementation by obtaining a paid subscription.
asked July 2026TwosigmaDirected Acyclic Graph (DAG) Algorithm Problem
2/5This graph theory problem, frequently featured in interviews at Two Sigma, evaluates your ability to navigate directional relationships between entities. Given a set of vertices and directed connections, your goal is to figure out whether a valid trajectory exists between two specific points. This challenge tests fundamental traversal techniques such as breadth-first search or depth-first search within network structures. Access to the complete problem breakdown and tested model implementation requires a subscription.
asked July 2026TwosigmaImplement an In-Memory Database with Simple SQL-like Commands
3/5This Two Sigma interview exercise tasks you with building a lightweight relational data store entirely in memory. You will need to parse and execute a sequential list of structured text commands, supporting table creation, data insertion, and conditional filtering queries. The challenge tests your data structures design, command parsing, and efficiency in memory management. The complete problem requirements and clean architectural solution are available with a subscription.
asked July 2026TwosigmaOrder Matching Engine
3/5Featured as a technical interview task at Two Sigma, this problem asks engineers to build a simplified financial exchange mechanism capable of processing and pairing bids and asks based on precise priority rules. The challenge examines your ability to design efficient data organization schemas, handle partial volume distributions, and maintain high-throughput ledger states. It evaluates both algorithmic efficiency and practical system modeling skills relevant to quantitative trading environments. The complete problem statement and professional solution code require a paid subscription.
asked May 2026SWEMLEOrder BookQR OA — Efficient Univariate OLS Regression
3/5This analytical coding challenge, reported from Two Sigma online assessments, requires computing univariate ordinary least squares regression slopes and dynamically updating them as new data points arrive in a streaming fashion without recomputing from scratch. It assesses mathematical fluency, statistical updates using sufficient statistics, and efficient data processing. Access the complete problem specification and verified model solution with a paid subscription.
asked May 2026RSDSLinear RegressionQR OA - NYC Temperature Regression
3/5This quantitative research coding assessment, featured in interviews at Two Sigma, tests your data analysis and predictive modeling skills using historical weather datasets. You will apply statistical aggregation techniques, least-squares linear regression, and feature selection strategies to forecast temperature metrics. The task evaluates your proficiency with data manipulation libraries and foundational machine learning evaluation metrics under strict time constraints. The complete problem statement and professional model solution are available exclusively to subscribers.
asked May 2026RSDSPandasQR OA — Linear Interpolator
3/5This Two Sigma coding question asks you to evaluate a function defined by connecting data points with straight segments, both inside and beyond the range of the data. It tests binary search, careful numerical edge cases and designing a class for fast repeated queries.
asked May 2026RSDSBinary SearchIn-Memory SQL-Like Database
3/5Tackle an extensive system-building problem frequently asked during technical evaluations at Two Sigma, where you are tasked with creating a lightweight relational database entirely in memory. This exercise tests your ability to design efficient data structures, parse custom query commands, and execute conditional filtering logic with multiple predicates. You will need to balance clean architecture principles with performance considerations for data insertion and retrieval operations. Elevate your coding capabilities by learning how to structure complex state management and command interpreters from scratch. Unlock the detailed system requirements and complete reference solution with a subscription.
asked April 2026SWEIn Memory DatabaseSQLSWE / QSE OA — IPO Share Allocation
3/5Simulate a fair stock distribution process where public offering shares are allocated to competing investors based on pricing hierarchy and submission timestamps. Documented from a Two Sigma online assessment, this coding task requires careful sorting, queue management, and iterative simulation to handle tied bids and remaining inventory correctly. It tests your ability to translate complex business rules into clean, deterministic code. Unlock the full challenge details and reference solution by purchasing a subscription.
asked March 2026SWEQueueSortingSWE / QSE OA — Sewer Tree Partition
3/5Reported as a Two Sigma SWE/QSE OA question, this problem presents a rooted tree structure defined by parent pointers and associated node values. The task is to identify a single edge to remove such that the tree splits into two components, and the absolute difference between the sums of values in these two new subtrees is minimized. This evaluates your ability to perform tree traversals, calculate subtree aggregates, and apply optimization techniques. The full problem and model solution require a subscription.
asked March 2026SWETreeDFSAdd Two Strings with a Single-Digit Adder
2/5This Two Sigma interview challenge evaluates your ability to combine individual numerical digits to perform full-scale addition on text-based representations of large integers. Candidates must demonstrate careful carry management and explain the performance trade-offs of their approach. Access to the comprehensive problem description and optimal algorithmic walkthrough requires a paid subscription.
asked February 2026RSDSStringMaximum Independent Set on a Tree
4/5Examine this classic graph theory challenge featured in software engineering interviews at Two Sigma. The task involves finding the largest possible subset of nodes within a hierarchical network such that no two chosen elements share a direct connection. This problem tests your expertise in dynamic programming on trees and optimizing independent sets under structural constraints. Working through this scenario enhances your ability to design efficient algorithms for complex relationship networks. The complete problem statement and model solution require a subscription.
asked November 2025Dynamic ProgrammingGraphHard DifficultyHashMap from Scratch
3/5Encountered in technical rounds at Two Sigma, this coding challenge requires building a fully functional hashmap from scratch without relying on built-in data structure libraries. Candidates must design custom storage buckets, implement effective collision resolution strategies, handle dynamic resizing, and ensure efficient key-value retrieval. The task tests deep object-oriented programming principles and a solid understanding of internal memory management. Gain access to the complete problem description and model solution with a paid subscription.
asked November 2025SWEHashmapLinked ListPalindrome Warmup + Two-Task Worker Scheduling
3/5Tackle this reported Two Sigma interview question that begins with checking symmetrical integer patterns before advancing to generating the next immediate sequence match. The second half of the exercise tests your algorithmic reasoning around resource allocation, specifically distributing personnel across dual assignments to optimize overall completion time. This challenge evaluates both your string manipulation intuition and your greedy optimization strategies under time pressure. Gain access to the full problem breakdown and a verified model implementation by purchasing a subscription.
asked October 2025RSDSPalindromesMaximum Product Path in a Complete Directed Graph
4/5Reported as a rigorous technical assessment for Two Sigma, this graph theory challenge asks you to determine a unique path across a complete directed structure that maximizes the total product of edge weights without revisiting nodes. It tests advanced algorithmic concepts, including logarithmic transformations to convert multiplicative objectives into additive ones, alongside dynamic programming with bitmasking. Access to the full problem text, complexity analysis, and verified model solution requires a subscription.
asked October 2025BitmaskDSDynamic ProgrammingImplement Merge Sort
3/5Write merge sort yourself: split the array, sort each half, and combine the halves back into order. This Two Sigma question is asked because the merge step exposes everything — whether you allocate once or per call, whether your comparison keeps equal elements in their original order, and whether the recursion bottoms out cleanly. You will manage the extra buffer within the stated allowance and state the time and space costs separately. The complete problem and the reference implementation are available to subscribers.
SortingDivide And ConquerArrays
Two Sigma coding interview FAQ
- What coding questions does Two Sigma ask?
- 21 reported coding questions, most often on Medium Difficulty, Twosigma, SWE, RS, DS.
- How hard is the Two Sigma coding interview?
- The reported coding questions average 3.0 out of 5: 2 at 2/5, 16 at 3/5, 3 at 4/5.
- Are these Two Sigma coding questions recent?
- The most recent report is from July 2026, and 18 were reported within the last twelve months. Dates come from the interview reports themselves.