First Pipeline That Closes a Loop
Asked at Two Sigma · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026
Pipelines are laid between cities one at a time, in the order of a list. Each pipeline joins two cities directly and can carry water in both directions. A pipeline is redundant when the cities it joins are already connected, directly or through other pipelines, by the pipelines laid before it. Find the first redundant pipeline in the list.
Loading the problem…
More Two Sigma interview questions
- Statistics Derivations: Correlation, Order Statistics, Regression Bias, Random Graphs
- GenAI Quant SWE Manager Deep Dive
- QR OA — Efficient Univariate OLS Regression
- QR OA - NYC Temperature Regression
- QR Data Analysis Prediction Case
- Order Matching Engine