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."
Compute Latencies and Search Grid Path
You are given two coding tasks from an internship interview. Task 1: Compute Message Latency from CSV Logs Two systems, ComputeA and ComputeB, exchang...
Find right-side view of binary tree
You are given the root of a binary tree. From the right side of the tree, at each depth you can see exactly one node: the rightmost node at that depth...
Implement Persistent KV Store Serialization
Implement a persistent in-memory key-value store. Requirements: - Keys and values are arbitrary byte strings or UTF-8 strings; do not rely on delimite...
Implement a Cursor-Based Text Editor
Implement an in-memory text editor that maintains a mutable string and a cursor position between characters. The editor starts with an empty document ...
Find the longest palindromic substring
Problem Given a string s, find the longest contiguous substring of s that is a palindrome (reads the same forward and backward). Input - A string s co...
Implement sliding-window rate limiter function
Problem You are implementing a per-user rate limiter. Time is discretized into integer time buckets (e.g., each bucket is 1 second). You are given two...
Group points by distance threshold
You are given N points in 2D space, points[i] = (xi, yi), and a distance threshold k > 0. Define an undirected graph where there is an edge between tw...
Count changed nodes between two menu trees
You maintain a merchant menu as a rooted tree. Each node represents a menu item/category and has: - key (string, unique among siblings) - value (integ...
Solve maze tasks and compute shortest routes
You are given two coding exercises from an interview loop. Problem A: Incremental “maze” codebase tasks (AI-assisted) You inherit an existing codebase...
Decode a JWT string without libraries
Implement a function that decodes (but does not necessarily verify) a JWT token. A JWT is a string of the form: ` <base64url(header)>.<base64url(paylo...
Simulate pouring water onto terrain
Problem You are given an integer array heights representing a 1D terrain (each index is a column height), an integer V (units of water), and an index ...
Choose root to minimize edge reversals
Problem You are given a connected graph with n nodes labeled 0..n-1 and n-1 directed edges. If you ignore directions, the edges form a tree (i.e., the...
Implement idempotent request handling with idempotency keys
Problem You are implementing an API endpoint (e.g., POST /charge) that must be idempotent using an Idempotency-Key. Design and implement an in-memory ...
Optimize a SQL query plan tree
Problem You are given an in-memory representation of a SQL query plan as a tree of nodes (a relational algebra plan). Each node is one of: - Scan(tabl...
Compute distance-sum from every tree node
Problem You are given an undirected tree with n nodes labeled 0..n-1 and a list of n-1 edges. The tree is connected and contains no cycles. For each n...
Design a rating aggregator that returns totals and averages
Design and implement a simple rating system (like movie/book reviews) that supports adding ratings and querying summary statistics. Requirements Imple...
Compute triangle min path and dice stopping stats
You are given two independent interview questions. 1) Triangle minimum path sum (DP) Given a triangular array triangle with n rows, find the minimum p...
Implement a Flappy Bird Jump Agent
Implement a function should_jump(state) -> bool for a simplified Flappy Bird game. The bird has a fixed horizontal position bird_x and a vertical posi...
Solve BST and Grid Query Problems
Solve the following coding problems. Problem A: Find the kth largest value in a BST You are given the root of a binary search tree and an integer k. R...
Implement a Least-Recently-Used Cache
Design and implement an in-memory least-recently-used cache. Requirements: - The cache is initialized with a positive integer capacity. - Implement ge...