InterviewLegend

Currency Paths & Tree DP

Alex Chen35 min readGuide updated

Two graph problems show up in Two Sigma's live rounds, and both look easier than they are. The currency one has five reports, from a September 2022 onsite to a January 2026 technical round, and a November 2025 phone screen sits in between. The tree one came up in a November 2025 onsite, and in a July 2025 onsite before that.

They share a habit. The brute force is easy to write and easy to get right on the sample, then it falls over on size. For the currency problem the fix is caching the right state. For the tree problem it's one pass with two numbers per person, written so that a 100,000-node chain doesn't blow the stack.

The Two Sigma angle
Two Sigma names recursion and traversals in its interview topics, and testing is one of the areas it grades. These two problems lean on exactly that. Say what your memo key is before you write it, and name the input that would break a recursive version. The interviewer will ask either way.

Two SigmaPremium lesson · Coding round

The 2 Two Sigma problems are below.

  1. A Premium questionCoding · Hard · Frequently asked
  2. A Premium questionCoding · Medium

Each with hints, the follow-up and a tested solution.

Get the Two Sigma questions

$49 a year · all 107 companies · instant access

20,000+ candidate reports

Two Sigma interview guide

Know what Two Sigma asks before you walk in.

21 coding · 4 system design · 13 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Two Sigma interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.