Software Engineer Coding & Algorithms Interview Questions
Practice 2,712 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."
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 (≥...
Merge two N-ary trees by key rules
You are given two N-ary trees A and B. Each node has: - key (string): unique among siblings (i.e., within a node’s children list, no two children shar...
Implement an LRU cache
Design and implement a data structure for a Least Recently Used (LRU) cache with a fixed capacity. The cache must support: - get(key): return the valu...
Solve Morse and Network Access Tasks
Solve the following two independent coding problems. Problem 1: Convert Between Text and Morse Code You are given the standard Morse-code mapping for ...
Implement A Contiguous Memory Allocator With Free-Block Coalescing
Review a contiguous memory allocator coding prompt with malloc, free, first-fit allocation, block coalescing, and a best-fit follow-up. The interview ...
Check Meeting Attendance With Breaks
This question evaluates proficiency with interval scheduling, time-format conversion, and constraint checking for sequential appointments, measuring a...
Add One to Digit Array
This question evaluates proficiency in array manipulation and elementary arithmetic on digit sequences, specifically carrying operations and edge-case...
Implement Datacenter Router Commands
This question evaluates proficiency in stateful command processing, input validation, geospatial computation (Haversine distance), deterministic sorti...
Find Any Local Minimum with Iterative Binary Search
Find Any Local Minimum with Iterative Binary Search Given a nonempty integer array numbers, return the index of any local minimum. An index i is a loc...
Traverse a tree and answer 2D prefix sums
This question evaluates a candidate's competency in tree traversal and array preprocessing, specifically in-order traversal of binary trees and 2D pre...
Design a constrained cache and secure string validator
This question evaluates proficiency in data structures and algorithms (constrained cache design), concurrent programming, complexity analysis, and sec...
Optimize a SQL query plan tree
This question evaluates understanding of relational algebra, query optimization techniques, and tree-based plan transformations such as predicate push...
Design KV store with sliding-window average QPS
Problem Design an in-memory key–value store that supports mutation operations and can report the average QPS (queries per second) over a recent time w...
Compute minimal operations and optimal server pairing
You are given two independent coding problems. Problem 1: Minimum range-increments to make an array nondecreasing Given an integer array power of leng...
Compute exclusive CPU time from nested logs
You are given logs from a single-threaded CPU that runs n functions (IDs 0 to n-1). Each log entry is a string in the format: - "functionId:start:time...
Design rolling-window conversation score tracker
This question evaluates a candidate's ability to design efficient data structures and algorithms for time-windowed streaming data, including maintaini...
Implement log aggregation in React
React Coding: Log stream aggregation You are building a small React feature that displays real-time statistics from a log stream. Log event format Eac...
Find the Maximum Number of Concurrent Processes
Practice a Amazon coding interview problem focused on find the maximum number of concurrent processes. The prompt emphasizes edge cases, clean impleme...
Find the Closest Version by Date
Practice a Amazon coding interview problem focused on find the closest version by date. The prompt emphasizes edge cases, clean implementation, and ve...
Choose the Best Travel Mode
Solve a grid-based pathfinding problem where a traveler must choose the transportation mode with the lowest travel time and cost tie-breakers. The que...