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 islands in a binary grid
You are given an m-by-n grid of characters where '1' represents land and '0' represents water. Count the number of connected land masses (islands) usi...
Design an in-memory database with TTL and history
Design and implement an in-memory key–field–value store with monotonic timestamps. Keys and fields are strings; values are integers. Provide these API...
Determine task order with prerequisites
You are given n tasks labeled 0..n−1 and a list of prerequisite pairs (a, b) meaning task b must be completed before task a. Determine one valid order...
Find shortest path and compare BFS vs DFS
Given an unweighted graph (directed or undirected), explain how to find the shortest path between two nodes without writing code. Describe the algorit...
Determine string buildability from dictionary
Given a non-empty string s and a list of non-empty words dict, determine whether s can be formed by concatenating words from dict with unlimited reuse...
Design faster delay-time computation
You are given an array of integers representing task priorities. Tasks execute from right to left. For each index i, define its delay time as j - i wh...
Solve parsing, counting, ranges, and window problems
Solve the following four algorithm problems: 1) Expression evaluator with + and : Given a string s containing non-negative integers, '+' and '' operat...
Design a rolling five-minute hit counter
Design an in-memory hit counter that supports: ( 1) recordHit(timestamp) to log an event, and ( 2) getCountLast5Minutes(now) to return the number of e...
Compute delivery times on a grid
You are given a 2D grid with cells marked as 'M' (warehouses), 'C' (customers), 'X' (obstacles), and '.' (roads). You can move up, down, left, or righ...
Design a coupon pricing engine
Design and implement a coupon application engine for a shopping cart. Each Item has id, category, and unitPrice. A Coupon has: applicableCategories (o...
Solve sliding window and tree BFS problems
1) Sliding window: Given an array of positive integers nums and an integer target, return the minimal length of a contiguous subarray whose sum is at ...
Find longest common contiguous subarray
Given two integer arrays A and B, find the length of the longest contiguous subarray that appears in both arrays. If multiple exist, return any one pa...
Implement a Timed Task Scheduler
Implement a runnable task scheduler. The scheduler should allow clients to add new tasks at any time. Each task has: - A callback or function to execu...
Find missing number from concatenated digits
Given an integer n (1 ≤ n ≤ 99) and a digit string s formed by concatenating the decimal representations of the integers 1..n except for one missing n...
Evaluate expression without stack, constant space
Evaluate expression without stack, constant space Given a string s representing a valid arithmetic expression of non-negative integers, the operators ...
Determine if robot path is bounded
Determine if robot path is bounded A robot starts at (0, 0) facing North on an infinite grid. It executes a string s consisting of 'G' (move forward 1...
Explain algorithm strategies and complexity
Explain algorithm strategies and complexity You are faced with a complex, potentially ambiguous coding problem. Describe how you would clarify require...
Compute sum of minima with removals
Compute sum of minima with removals You are given an array weights[0..n-1] of positive integers representing product weights in a line. Repeat until n...
Maximize Profit From Cutting Rods
Given an array lengths where lengths[i] is the length of the i-th rod, determine the maximum profit obtainable by choosing a single integer saleLength...
Find k-th smallest subarray sum
Problem You are given an integer array nums of length n where all elements are positive integers, and an integer k. Consider all non-empty contiguous ...