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 linked-list and top-K algorithm tasks
Question Given a singly linked list, return the k-th node counted from the end. Given an integer array, return the top k most frequent numbers. Given ...
Maximize path score in DAG
Question Given a weighted directed acyclic graph (DAG) where each node v has a score w(v) and each edge (u→v) has a time cost t(u,v), starting from no...
Find LCA in organization tree
Find LCA in organization tree Given an organizational hierarchy tree, return the lowest common organization (parent node) for two or more employees (≥...
Compute delay times in priority array
Question Given an array of integers representing task priorities processed from right to left, return an array where each element is the distance (ind...
Implement test failure analytics APIs
Question Design a data structure that supports: log(testId, timestamp, status) — record the status ('pass'/'fail') of a test run; timestamps are stric...
Compute balances and array queries
Question Given a list of transactions where each transaction has a userId and an amount (positive for credit, negative for debit), compute the final b...
Implement Prefix Match Filter
Design a data structure that stores a collection of prefix strings. Then, given a list of input strings, return every string that begins with at least...
Find longest unique show window
Given an array of show names (strings) representing a user's viewing history, return the start and end indices of a longest contiguous subarray that c...
Design top-K tracker with linked lists
Design top-K tracker with linked lists Design a data structure that tracks the top-K most frequent keys in a stream. Support operations increment(key)...
Implement a same-host web crawler
Implement a web crawler. Given a start URL and a function get_links(url) -> list of URLs, return all URLs that share the same hostname as the start. A...
Design streaming test logger and queries
Implement a streaming logger and two query operations for test runs with globally strictly increasing timestamps. 1) Implement log(test_id, timestamp,...
Implement version string comparator with extensions
Implement a function compareVersions(a, b) that compares two software version strings. Each version consists of dot-separated numeric components (e.g....
Determine feasible task ordering
You are given n tasks labeled 0..n−1 and a list of dependency pairs (a, b) meaning task a requires task b to be completed first. Implement functions t...
Compute prices, distances, and Top-K for orders
Compute prices, distances, and Top-K for orders Build functions for a food‑delivery analytics module. Data: - Restaurants: id, (x, y) location, menu m...
Solve rotating-lock BFS with blockers
You are given a 4-digit lock starting at "0000". In one move, you may pick a single position and rotate it +1 or −1 with wrap-around (0→9 on −1, 9→0 o...
Design test logging and failure-window queries
Build an in-memory service to log test run results and answer two queries. Assumptions: events arrive with strictly increasing timestamps across all t...
Solve BFS grid delivery routing
You are given an m×n grid representing a city: 'S' are DashMart stores, 'H' are homes, '.' are roads, and '#' are obstacles. Movement is allowed in fo...
Compute fruit spoilage time in a grid
Given an m×n grid representing kitchen cells: 0 for empty, 1 for fresh fruit, and 2 for spoiled fruit. Each minute, any fresh fruit adjacent (up, down...
Solve min window & animal conflicts
Question LeetCode 76. Minimum Window Substring: Given strings s and t, return the smallest substring of s that contains every character of t (includin...
Solve LeetCode array & stream problems
Question LeetCode 346. Moving Average from Data Stream LeetCode 249. Group Shifted Strings LeetCode 163. Missing Ranges Remove duplicates from a chara...