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."
Design O(1) insert/delete and frequency-weighted random
Problem Design a data structure that supports the following operations in average \(O(1)\) time: 1. add(x) -> bool - Inserts value x into the colle...
Solve graph and linked list tasks
You are given three independent coding tasks. 1) Determine which items can be produced (dependency graph) You have: - recipes: a list of n item names....
Delete a Node From a Search Tree
Given the root of a binary search tree and an integer key, delete the node whose value equals key if it exists. Return the possibly new root while pre...
Find most frequent call path in logs
You are given a sequence of trace log lines for a single-threaded program. Each line is either a function entry or exit: - Entry: "-> funcName" - Exit...
Solve common interview coding problems
You are given several independent coding tasks (typical of SWE/MLE interview rounds). For each task, design an algorithm and describe the time/space c...
Implement a sliding-window rate limiter allow()
Problem Implement a sliding-window log rate limiter. Design a class RateLimiter initialized with: - maxRequests (e.g., 100) - windowMillis (e.g., 60_0...
Implement type AST and infer generics
Toy language type system: AST + generic inference You are implementing a tiny type system for a toy language with: - Primitive types: char, int, float...
Design structure for insert and k-th largest
Design a class that supports two operations over a multiset of integers (duplicates allowed): - insert(num: int) -> void: add num to the data structur...
Compute maximum later-earlier difference
You are given an integer array output (length n ≥ 1). Define the gain of choosing indices i < j as output[j] - output[i]. Return the maximum gain over...
Design a bank system with scheduled transfers
Bank System (OOD): Accounts, Transfers, Scheduling, Top Spending, Merge Design an in-memory banking system that supports: - account creation - deposit...
Track Highest-Earning Experience
You are building a core component for a real-time analytics system that tracks the profitability of experiences on a large online platform. Implement ...
Solve set equality and ad log top‑K
Problem Set (Coding) 1) Check whether two sets are equal You are given two integer arrays A and B that represent sets, except they may contain duplica...
Solve tree equality and valid parentheses
You are asked to solve two independent coding questions. 1) Compare two binary trees for equality Given the roots of two binary trees p and q, return ...
Find the Slowest Function from Profiler Events
You are given a time-ordered profiler event log for a single-threaded program. Each event is one of: - START functionName timestamp: execution enters ...
Find the Shortest Target-Sum Path
Given the root of a binary tree and an integer targetSum, find a root-to-leaf path whose node values add up to targetSum. Return the path as a list of...
Find the nth prime number
Given an integer n (1-indexed), return the n-th prime number (e.g., n=1 -> 2, n=2 -> 3, n=3 -> 5). Design an algorithm that is efficient for moderatel...
Implement a multithreaded task executor with semaphores
Design and implement a thread-safe TaskExecutor that limits concurrent work using a semaphore-like mechanism. You are given an interface similar to: -...
Compute 5-minute rolling average load
You are building a monitoring component for a key–value (KV) store. Each request contributes 1 unit of load at its request time. Design a data structu...
Solve classic array, graph, and parsing problems
Implement and analyze solutions to the following independent tasks: 1) Expression evaluator: Given a string s of digits, '+', '-', '*', '/', and space...
Find value on most distinct levels
Given a binary tree whose nodes store values (e.g., characters), find the value that appears on the greatest number of distinct depth levels. For exam...