SoFi Coding Interview Questions
25 SoFi coding interview problems with full optimal solutions — 13 easy, 10 medium, 2 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an SoFi interviewer values, and a FAQ section.
- #1easyfoundational
1. Two Sum
Find two indices whose values sum to a target — a hash-map warmup SoFi uses to gauge baseline fluency before loan-calculation rounds.
- #2easyfoundational
2. Valid Parentheses
Validate bracket matching using a stack — SoFi uses this to gauge fluency with stack-based parsers for transaction-rule strings.
- #3easyfoundational
3. Merge Two Sorted Lists
Merge two sorted linked lists — SoFi maps this to merging two sorted streams of loan-payment events.
- #4easyfoundational
4. Remove Duplicates from Sorted Array
Dedupe a sorted array in-place — SoFi uses this as a stand-in for deduping repeated loan-disbursement records.
- #5easyfoundational
5. Remove Element
In-place removal of a target value — at SoFi this becomes filtering reversed transactions from a payment batch.
- #6easyfoundational
6. Search Insert Position
Binary search for the insertion point of a value — SoFi uses this to gauge fluency with sorted-array lookups in their loan-amortization tables.
- #7easyfoundational
7. Maximum Subarray
Find the contiguous subarray with the largest sum — SoFi frames this as finding the best contiguous return window in a portfolio's daily PnL series.
- #8easyfoundational
8. Plus One
Increment a number stored as a digit array — SoFi uses this as a warmup for big-integer arithmetic that appears in their interest-precision code.
- #9easyfoundational
9. Same Tree
Given two binary trees, check if they are structurally identical with the same node values — a recursion warm-up SoFi uses when modeling account hierarchy comparison.
- #10easyfoundational
10. Symmetric Tree
Determine if a binary tree is a mirror of itself — SoFi uses this to gauge tree-recursion intuition before scaling up to portfolio-balance trees.
- #11easyfoundational
11. Maximum Depth of Binary Tree
Return the height of a binary tree — SoFi uses this as a starter to verify candidates can write clean DFS, since loan-portfolio risk trees can grow deep across guarantor chains.
- #12easyfoundational
12. Pascal's Triangle
Generate the first numRows of Pascal's triangle — SoFi uses this to test whether candidates can derive each row from the previous, a pattern that mirrors compounding interest schedules.
- #13easyfoundational
13. Single Number
Find the element that appears exactly once when every other element appears twice — a classic O(1) space problem SoFi uses to filter out brute-forcers.
- #14mediumfoundational
14. Add Two Numbers
Add two numbers represented by linked lists in reverse order — SoFi loves this because manual carry propagation is identical to multi-period loan amortization with monthly carry-overs.
- #15mediumfoundational
15. Longest Substring Without Repeating Characters
Find the length of the longest substring with all unique characters — SoFi uses this to test sliding-window mechanics that show up in time-window risk scoring.
- #16mediumfoundational
16. Container With Most Water
Find two lines that form the largest water-holding container — SoFi uses this two-pointer classic to test whether candidates can reason about monotonic invariants.
- #17mediumfoundational
17. 3Sum
Find all unique triplets that sum to zero — SoFi uses this as a litmus test for de-duplication mechanics that appear in trade-allocation reconciliation.
- #18mediumfoundational
18. Group Anagrams
Group strings that are anagrams of each other — SoFi uses this to see if you can pick the right canonical key, a common move in transaction-categorization pipelines.
- #19mediumfoundational
19. Merge Intervals
Merge all overlapping intervals — SoFi uses this constantly because loan-statement billing periods and recurring transaction windows are interval problems in disguise.
- #20mediumfoundational
20. Unique Paths
Count the number of distinct paths from top-left to bottom-right in an m x n grid moving only right or down — SoFi uses this DP warm-up because it's structurally identical to counting investment-portfolio rebalancing paths.
- #21mediumfoundational
21. Word Search
Determine if a word can be constructed in a 2D board by walking adjacent cells without reuse — SoFi uses this DFS/backtracking classic to test recursion-with-rollback intuition.
- #22mediumfoundational
22. Coin Change
Return the minimum number of coins needed to make up a given amount — SoFi loves this because it mirrors how a loan-amortization engine selects the smallest set of payments to clear principal.
- #23hardfoundational
23. Median of Two Sorted Arrays
Find the median of two sorted arrays in O(log(m+n)) time — SoFi uses this hard problem to filter for candidates who can do binary search on answer space, the same pattern used in portfolio-risk percentile computations.
- #24hardfoundational
24. Trapping Rain Water
Given heights of bars, compute how much rain water can be trapped — SoFi uses this to test prefix-max reasoning that mirrors high-water-mark logic in portfolio drawdown calculations.
- #25mediumfoundational
25. Longest Increasing Subsequence
Find the length of the longest strictly increasing subsequence in an integer array — a classic DP problem SoFi applies to modeling loan amortization schedules and sequential credit score trends.