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."
Solve Topological Sort and Anagram Indices
1) Given a directed graph (n vertices, m edges), return a topological ordering if one exists. If the graph contains a cycle, detect it and explain how...
Compute Earliest Bus Arrival
You are given several bus routes connecting multiple stops. Each route can be represented as directed segments between consecutive stops. For every se...
Design org chart lookup with preprocessing
You are given an organization chart represented as a list of pairs [managerName, directReportName]. Names are unique strings. The data may form a fore...
Compute shortest path with obstacles
Compute shortest path with obstacles You are given an m×n grid with nonnegative cell costs and blocked cells marked '#'. You may move up, down, left, ...
Find LCA in a BST
Find LCA in a BST Given the root of a binary search tree and two keys p and q, return the value of their lowest common ancestor (the deepest node whos...
Design an IR for test workflows
Design an IR for test workflows Design an intermediate representation (IR) for a graphics testing workflow as a DAG. Define node/edge types, metadata,...
Validate 9x9 grid in one pass
Validate 9x9 grid in one pass Given a partially filled 9x9 board using digits '1'–'9' and '.' for empty cells, determine whether the current configura...
Maximize pay by flipping k rest days
Given integers BasePay and Bonus, a binary string schedule of length n where '1' means work and '0' means rest, and an integer k, you may change up to...
Generate split-stay pairs efficiently
Given N Airbnb listings, each with available days as integers, and an inclusive requested date range [L, R], return all ordered pairs (X, Y) of distin...
Simulate one-round color elimination on a grid
Given an m x n integer matrix board where board[r][c] > 0 represents a color and 0 represents empty: ( 1) A nonzero cell at (r,c) explodes in this rou...
Implement merge-in-place and group cyclic-equivalent strings
You are given two ascending arrays to merge in place and a separate grouping task: Part A — In-place merge without known sizes: - Array A contains sor...
Design document layer with undo/redo
Design a document layer that supports applying edits and undo/redo. Implement apply(op) to mutate the document, undo() to revert the most recent commi...
Implement DFS and tree algorithms
Part 1 (DFS on graph): Given an undirected graph with n nodes labeled 0..n-1 and an edge list, implement a function that returns all connected compone...
Check path in N-ary tree
Given the root of an N-ary tree and a sequence of integers path[0..k-1], determine whether there exists a path starting at the root whose node values ...
Find >n/3 elements in sorted array
Question Given a sorted (non-decreasing) integer array A of length n, return all distinct values that occur strictly more than n/3 times. Design an al...
Count inversions in an array efficiently
Given the array [5, 7, 9, 2, 3, 12, 8, 4], compute the number of inversion pairs (i, j) where i < j and arr[i] > arr[j]. Describe both a naive O(n^ 2)...
Design an in-memory cloud storage system
Design and implement an in-memory cloud storage system that maps file paths to metadata and supports multi-user quotas. Use simple data structures; pe...
Design mutable sum-tree with fast queries
You're given a rooted, mutable tree. Each leaf node stores an integer value. Each internal node's value equals the sum of its immediate children's val...
Count regions with DFS
Given an m x n grid of 0s and 1s, count the number of connected regions consisting of 1s using depth-first search (4-directional adjacency). Return th...
Optimize with a cache/hash map
Question This is a follow-up to your existing implementation (for example, a script that repeatedly resolves file paths or parses license strings into...