Software Engineer Coding & Algorithms Interview Questions
Practice 2,306 real Coding & Algorithms interview questions for Software Engineer roles. From companies including Meta, Amazon, Google, Uber, Microsoft.

"I got asked a hardcore MCM DP question and I saw it on PracHub as well. Solved that question in 5 minutes. Without PracHub I doubt I could solve it in 5 hours. Though somehow didn't get hired, perhaps I guess I solved it too fast? /s"

"Believe me i'm a student here jn US. Recently interviewed for MSFT. They asked me exact question from PracHub. I saw it the night before and ignored it cause why waste time on random sites. I legit wanna go back and redo this whole thing if I had chance. Not saying will work for everyone but there is certainly some merit to that website. And i'm gonna use it in future prep from now on like lc tagged"

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
Validate a simplified numeric string
Implement isValidNumber (s) that returns true if and only if the ASCII string s represents a valid number under these simplified rules: - Optional lea...
Find shortest substring with N unique characters
You are given a string s and an integer n. Find the shortest contiguous substring of s that contains exactly n distinct characters. If there is no suc...
Choose fastest transportation mode on city grid
You live in a city modeled as a 2D grid. Each cell is either: - A transportation mode 1..4 where: - 1 = Walk, 2 = Bike, 3 = Car, 4 = Train - S = sou...
Design iterator for sorted union
Problem: Union Iterator for Sorted Inputs You are given two input iterators it1 and it2. Each iterator returns integers in strictly increasing order (...
Compute ETA between two map nodes
Problem You are given a semantic road map represented as a weighted graph. Each node is an intersection/waypoint, and each edge represents a drivable ...
Produce valid student lineup from parent array
You are given a hierarchy of n students represented by a parent array par of length n. - Students are labeled 1..n. - par[i] is the parent (mentor/man...
Implement an in-memory DB with TTL backup/restore
Problem Design an in-memory database that stores values in a nested structure: - key (string) → field (string) → value (string) - Each (key, field) en...
Implement a search autocomplete suggestion service
Design an autocomplete component that suggests the most relevant search phrases as a user types. You are given historical sentences with their usage c...
Implement a lazy inorder traversal iterator
Design an iterator over a binary tree that returns nodes in inorder sequence (left → root → right) using lazy traversal (i.e., you may not precompute/...
Count visible people to the right
Problem You are given an array heights of length n, where heights[i] is the height of the i-th person standing in a line from left to right. For each ...
Design an in-memory cloud file system
In-Memory Cloud File System (OOD) Design an in-memory cloud file system that supports files owned by users with storage quotas. Data model / rules - E...
Find minimum threshold enabling grid path
Problem You are given an m x n integer grid grid. You start at the top-left cell (0, 0) and want to reach the bottom-right cell (m-1, n-1). You may mo...
Compute iterative sliding-window sum reduction
Problem Given an integer array nums and an integer window size k, repeatedly apply the following reduction: - If len(nums) > k: replace nums with a ne...
Solve array duplicates and two-type subarray
Coding questions Solve the following array problems. Problem 1: Check for duplicates Given an integer array nums, return true if any value appears at ...
Extend cloud file system with copy and compression
In-Memory Cloud File System V2: Copy, Capacity Updates, Compress/Decompress Design an in-memory file system with per-user quotas and additional operat...
Implement a Word Guessing Game
Implement a four-letter word guessing game. You are given: - A dictionary containing valid four-letter English words. - A target word selected from th...
Solve Three Algorithmic Tasks
You were asked three coding problems: 1. Count events inside a time window - You are given an initial collection of event timestamps in HH:MM:SS fo...
Group words that map to same phone digits
Problem On a classic phone keypad (T9), letters map to digits: - 2: ABC, 3: DEF, 4: GHI, 5: JKL, - 6: MNO, 7: PQRS, 8: TUV, 9: WXYZ Given a list of lo...
Implement an In-Memory Database
Design and implement an in-memory database that stores records by key. Each record is a map from field to integer value. Implement the following funct...
Implement Trie search with wildcard matching
Design a text dictionary using a Trie. Support the following operations: - addWord(word): Insert a lowercase English word. - search(pattern): Return t...