InterviewLegend

Graphs, Trees & Backtracking

Alex Chen40 min readUpdated 17 real interview reports

Graph and tree traversal comes up across SoFi's loops, from phone screens to Staff onsites. The set below has one graph search, one tree problem and one backtracking task.

You'll write the code for these quickly, and the conversation around it takes longer. In Java, a recursive walk down a long chain throws StackOverflowError, so know the explicit stack version and be ready to switch to it before the interviewer asks.

Have a cost ready for each one too, and know when the size of the output itself sets the floor, so you don't spend time looking for something faster. Each problem below shows the code, the cost and the follow-up you're likely to hear.

SoFiPremium lesson · Coding round

The 3 SoFi problems are below.

  1. A Premium questionCoding · Easy · Frequently asked
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

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

Get the SoFi questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

Had your SoFi interview?Tell us what they asked. Reviewed before it goes in, never with your name.
SoFi interview guide

Know what SoFi asks before you walk in.

25 coding · 2 system design · 24 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

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