Software Engineer Coding & Algorithms Interview Questions
Practice 2,257 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."
Rank songs by pairwise user preferences
You are given preference rankings for n users over m songs. Each song is labeled from 0 to m - 1. For each user i (0-indexed), you are given an array ...
Compute transfers to balance account debts
Problem: Balance accounts by generating transfers You are given a dictionary/map balances from accountId -> netBalance. - A positive balance means the...
Place Pieces on a Grid
Given integers n and m, and an ordered list figures where each element is one of "A", "B", "C", "D", or "E", construct an n x m integer matrix grid. T...
Minimize deaths in spreading plant infection
You are given an m x n grid representing a garden: - 0: empty cell - 1: healthy plant - 2: infected plant The garden evolves day by day in the followi...
Implement Stock Price Query APIs
You are given an initial collection of stock price records. Each record contains: - symbol: a stock name or ticker string - timestamp: initially a cal...
Implement Order Modification Feature
You are given an existing C++ trading system with a client/server architecture. The current system already supports two request types: - AddOrder(orde...
Solve Three Coding Interview Problems
The coding round contained three independent problems: 1. Merge two sorted arrays and remove duplicates. Given two sorted integer arrays a and b, retu...
Set second tree values by subtree sums
Given the roots of two complete binary trees T1 and T2 that have identical structure and the same number of nodes, replace each value in T2 with the s...
Implement Binary Search in C++
From scratch in C++, implement binary search over a sorted array to locate a target value. Provide a correct iterative implementation, handle not-foun...
Implement custom iterator classes
Question In a blank coding environment (no IDE assistance, no autocomplete), implement an iterator abstraction entirely from scratch. The interviewer ...
Determine whether two nodes are related
Problem You are given genealogy information for a set of chickens. The data consists of parent → child relationships (e.g., (parentId, childId) pairs)...
Print all odd numbers from an integer list
Problem Given a list/array of integers nums, print (or return) every odd number in the list, in the same order they appear. Clarifications / follow-up...
Implement a rate limiter at scale
Problem Design and implement a rate limiter that enforces request limits per key (e.g., per user ID or API key). Requirements - Implement allow(key, t...
Compute reachable cells for a cleaning robot
You are given a 2D grid representing a floor plan: - 0 = free cell (the robot may stand on it) - 1 = blocked cell (obstacle) The robot can move from a...
Solve binary-tree reverse printing and LPS
You are given a binary tree node definition: - TreeNode { int val; TreeNode left; TreeNode right; } Answer the following two algorithmic questions. 1)...
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 Composable Event Recommendation Engine
Design and implement a flexible event recommendation engine in Java. You are given domain objects such as Event, Customer, Inventory, and a LocationSe...
Schedule batched register operations optimally
Problem You are given a text file that describes batches of register operations (reads and writes) on integer-indexed registers. Your task is to sched...
Find viewing direction that sees most points
You are standing at the origin on a 2D plane. You are given a list of points points[i] = (xi, yi) (not necessarily distinct), and a viewing angle thet...
Find where to cut cake into equal areas
Cut a cake so both sides have equal area A cake is made of N rectangular blocks arranged left-to-right in a straight line (no gaps, no overlap). Block...