Sofi

Sofi Software Engineer Interview Questions

32+ questions from real Sofi Software Engineer interviews, reported by candidates.

32
Questions
6
Round Types
8
Topic Areas
2025-2026
Year Range

Round Types

Phone 16 Onsite 9 Coding 2 Recruiter 1 Phone Screen 1 OA 1

Top Topics

Questions

Anyone got OA for sofi swe intern. I received invitation from recruiter yesterday and completed today. It wasnt too bad but little tricky. Anyone know how the recruitment process goes forward from her

Can anyone share their interview experience with Sofi? I have a tech screen round for senior role

Did anyone interview at SoFi for a SWE role? I have a technical screen coming up..

This post was last edited by juliaxx on 2025-09-25 12:10. Given a list of string wordset containing anagrams, and a list of strings containing sentences. You can replace words in sentences with anagra

The following content requires a score higher than 220. You can already view it. The first round only allowed Java; no other languages were permitted. The interviewer added other languages, which migh

I have a recruiter phone screen coming up for the Software Engineer position at SoFi. Has anyone gone through this recently? What kind of questions should I expect in the call? Any tips would be super

LeetCode #347: Top K Frequent Elements. Difficulty: Medium. Topics: Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect. Asked at SoFi in the last 6 months.

LeetCode #380: Insert Delete GetRandom O(1). Difficulty: Medium. Topics: Array, Hash Table, Math, Design, Randomized. Asked at SoFi in the last 6 months.

## Problem Find all starting indices of anagrams of a pattern in a given string. ## Likely LeetCode equivalent Directly matches Find All Anagrams in a String (LC 438). ## Tags strings, sliding_window, hash_table, sofi

## Problem Simulate asteroid collisions in a row: same direction pass through, opposite directions collide with larger surviving. ## Likely LeetCode equivalent Directly matches Asteroid Collision (LC 735). ## Tags stack, arrays, sofi

## Problem Return the top-rated TV shows within each genre from a dataset, likely using grouped sorting or heaps. ## Likely LeetCode equivalent No confident single LC match. ## Tags heap, hash_table, sorting, sofi

## Problem Implement or operate on a Binary Search Tree with operations like insert, delete, search, or validate BST property. ## Likely LeetCode equivalent Similar to Validate BST (LC 98) or operations on BST nodes. ## Tags binary_tree, binary_search, sofi

## Problem You are given a list of blocked words and a document string. Return the document with every blocked word replaced by asterisks (`*`) of equal length. Matching is case-insensitive; non-alpha characters act as word boundaries. ```python def block_words(blocked: list[str], document: str) -> str: pass ``` **Example:** ``` blocked = ["bad", "spam"] document = "This is a Bad example with spam content." output -> "This is a *** example with **** content." ``` ## Follow-ups 1. How would you handle partial matches, e.g., blocking "bad" should not match "badminton"? 2. If `blocked` contains 100,000 entries, how do you reduce lookup time? (Trie vs. hash set trade-offs.) 3. The document is a 10 GB log stream arriving in chunks. How do you process it without loading it all in memory? 4. Extend the solution to support wildcard patterns like `sp*m`.

## Problem Find the minimum number of character changes required to make two strings anagrams of each other. ## Likely LeetCode equivalent Similar to Minimum Number of Steps to Make Two Strings Anagram (LC 1347). ## Tags strings, hash_table, sofi

## Problem Given an integer array `nums`, find the length of the longest contiguous subarray that contains no duplicate values. ```python def clean_subarray(nums: list[int]) -> int: pass ``` **Example:** ``` nums = [2, 1, 3, 1, 4, 3, 5] output -> 4 # subarray [1, 4, 3, 5] or [3, 1, 4, 3] -- wait, [1,4,3,5] is the answer nums = [1, 1, 1] output -> 1 ``` ## Approach Sliding window with a hash set. Expand `right`; when a duplicate is found, shrink from `left` until the duplicate is evicted. O(n) time, O(k) space where k is the window size. ## Follow-ups 1. Return the actual subarray, not just its length. 2. What if "clean" means at most k distinct elements instead of zero duplicates? 3. How does your solution behave on a sorted vs. random array -- any optimization possible? 4. Extend to a 2D matrix: find the largest rectangular sub-matrix with no repeated value in any row.

## Problem Given a list of `n` integer arrays, return all elements that appear in every array. The result should be sorted in ascending order and contain no duplicates. ```python def common_elements(arrays: list[list[int]]) -> list[int]: pass ``` **Example:** ``` arrays = [[3, 1, 2, 4], [1, 2, 5], [2, 1, 6]] output -> [1, 2] arrays = [[1, 2], [3, 4]] output -> [] ``` ## Approach Convert the first array to a set, then intersect with each subsequent array. Final result sorted. O(n * m) time where m is average array length. ## Follow-ups 1. What if `n` is 10,000 and each array has up to 1 million elements? Discuss memory trade-offs. 2. How do you handle duplicates within a single array -- does an element need to appear multiple times per array to be counted multiple times in the output? 3. Implement without using Python's built-in `set.intersection`. 4. Given the arrays arrive as a stream one at a time, maintain the running intersection incrementally.

## Problem Design a `CreditScoreSystem` that manages user credit scores. Starting score is 700 for every new user. Implement the following operations: - `add_user(user_id)` -- register a new user. - `record_payment(user_id, on_time: bool)` -- on-time payment adds 10 points; missed payment subtracts 40 points. Score is clamped to [300, 850]. - `get_score(user_id) -> int` -- return current score. - `top_k(k: int) -> list[str]` -- return the k users with the highest scores (ties broken by `user_id` lexicographically). ```python class CreditScoreSystem: def add_user(self, user_id: str) -> None: ... def record_payment(self, user_id: str, on_time: bool) -> None: ... def get_score(self, user_id: str) -> int: ... def top_k(self, k: int) -> list[str]: ... ``` **Example:** ``` sys.add_user("alice"); sys.add_user("bob") sys.record_payment("alice", True) # alice -> 710 sys.record_payment("bob", False) # bob -> 660 sys.top_k(1) -> ["alice"] ``` ## Follow-ups 1. How would you make `top_k` efficient if there are 50 million users? 2. Add a `history(user_id) -> list[int]` method returning all score snapshots. What is the storage impact? 3. How do you handle concurrent `record_payment` calls for the same user in a multithreaded context?

## Problem You are given a list of pipeline events. Each event is a tuple `(file_id, stage, status, timestamp)` where `status` is either `"start"` or `"end"`. Compute the total processing time for each file and the per-stage breakdown. ```python def file_processing_time( events: list[tuple[str, str, str, int]] ) -> dict[str, dict[str, int]]: # Returns {file_id: {stage: duration, "total": total_duration}} pass ``` **Example:** ``` events = [ ("f1", "parse", "start", 0), ("f1", "parse", "end", 5), ("f1", "compile", "start", 5), ("f1", "compile", "end", 12), ] output -> {"f1": {"parse": 5, "compile": 7, "total": 12}} ``` ## Follow-ups 1. What if events for different files are interleaved? Does your solution still work? 2. Handle missing `"end"` events -- mark those stages as `"incomplete"`. 3. Stages can overlap (parallel execution). How do you compute wall-clock total vs. CPU-sum total? 4. The events arrive out of timestamp order from distributed workers. How do you handle sorting efficiently?

## Problem Find the top-K most frequently used tags from a collection of posts or items. ## Likely LeetCode equivalent Similar to Top K Frequent Words (LC 692) or Top K Frequent Elements (LC 347). ## Tags heap, hash_table, sofi

## Problem Identify users or accounts with abnormally high transaction frequency within a time window. ## Likely LeetCode equivalent No confident single LC match. ## Tags hash_table, sliding_window, sofi, finance

See All 32 Sofi Software Engineer Questions

Full question text, answer context, and frequency data for subscribers.

Get Access