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 playlist with add/remove/shuffle
Music Playlist Data Structure Design an in-memory Playlist data structure that supports the following operations on a set of songs: - add(songId): Add...
Implement a thread-safe high-concurrency LRU cache
Problem Design and implement an in-memory LRU (Least Recently Used) cache that supports concurrent access. Basic requirements Implement a cache with f...
Merge collinear overlapping 2D segments
You are given a collection of 2D line segments. Each segment may be represented either as: - two endpoints (x1, y1) and (x2, y2), or - a polyline with...
Validate hiring request under role constraints
Problem You are building a simple HR assignment validator for a platform with companies, employees, and job roles. When the system receives a request ...
Check if one string is a subsequence of another
Given two strings s and t, determine whether s is a subsequence of t. A subsequence keeps relative order but does not require contiguous characters. I...
Serialize and deserialize a binary tree
Problem Design two functions to serialize and deserialize a binary tree. - Serialize: convert a binary tree into a single string. - Deserialize: recon...
Evaluate ACL rules for IP and CIDR
Problem You are implementing an IPv4 access-control list (ACL). The ACL contains ordered rules; each rule has: - action: either ALLOW or DENY - cidr: ...
Compute minimax grid path and network delay
Problem (two related shortest-path tasks) Part 1 — Minimize the maximum value along a grid path ("minimax" path) You are given an m x n integer grid H...
Dedupe titles in per-shelf viewport
You are rendering a streaming app home page. - The home page consists of shelves displayed from top to bottom. - Each shelf contains a list of titleId...
Implement array and tree traversal tasks
You are interviewing for a storage/infra-leaning role. Solve the following coding tasks and be ready to discuss time/space complexity and edge cases. ...
Solve matrix groups and recipe inventory
Problem 1: Find the smallest 3×3 group in a matrix You are given an m × n 2D integer array grid. - Partition the grid into non-overlapping 3×3 blocks,...
Design an in-memory filesystem and circular queue
Part A — Design an in-memory hierarchical file system. Requirements: - Support operations: ls(path), mkdir(path), createFile(path, content), appendToF...
Compute max team size with a core interval
You are given n employees’ working-time intervals, where employee i works during the inclusive interval [startTime[i], endTime[i]]. You want to form a...
Compute total after discounting most expensive item
Problem You are given: - An array prices of length n, where prices[i] is the price of the i-th item. - An integer discountPercent (0 to 100). A promot...
Solve four algorithmic problems
Solve the following coding tasks. For each, describe your approach, complexity, and handle edge cases. 1) Make parentheses string valid with minimal d...
Answer k-step ancestor queries in a rooted tree
You are given a rooted tree encoded as a parent array par[1..n] where: - Nodes are labeled 1..n. - par[i] is the parent of node i. - Exactly one node ...
Implement a Contiguous Memory Manager
You are asked to implement a contiguous memory manager for an array of n memory cells indexed from 0 to n - 1, where all cells are initially free. Sup...
Solve interval merging and histogram area
The coding round included two algorithm problems: 1. Merge overlapping intervals: Given a list of closed intervals [[start1, end1], [start2, end2], .....
Compare common data structures and uses
Compare common data structures and select appropriate ones for specific tasks. For arrays, linked lists, stacks, queues, hash tables, binary search tr...
Design a duplicate-file removal algorithm
Your filesystem contains millions of photos. Duplicates are strictly byte-identical files (no ML/CV similarity). Design an algorithm to detect and del...