Graphs, Trees & Backtracking
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.
- A Premium questionCoding · Easy · Frequently asked
- A Premium questionCoding · Medium
- 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.
SoFi interview guideKnow what SoFi asks before you walk in.
25 coding · 2 system design · 24 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.