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."
Build a Wordle-style game in React
Task Implement a simplified Wordle-style game as a small React app. No styling/CSS is required (plain HTML output is fine). Game rules (assume Wordle-...
Minimize shortest path by adding weight-1 edges
You are given a weighted directed graph with nodes labeled 1..n. The existing edges are described by three arrays of equal length m: - from[i]: start ...
Determine Exact Layover Booking
You are given a layover duration target_hours and a list of experience durations durations, such as [2.0, 3.6], where each number represents the numbe...
Implement a Hierarchical File System
Implement an in-memory hierarchical file system. Create a class FileSystem with the following methods: - FileSystem() initializes an empty file system...
Find longest increasing contiguous subarray
Problem You are given an integer array nums (length n). Part 1 Find the length of the longest contiguous subarray that is strictly increasing (i.e., f...
Design a rolling hit counter API
Rolling hit counter (time/space optimized) Design a data structure that records events (“hits”) and can return how many hits happened in the most rece...
Implement dasher active-time calculator
Implement a function that, given a dasherId, a local pay-period interval [startLocalDateTime, endLocalDateTime), and a list of order events of the for...
Compute height after deletions; enumerate valid delete sets
Warm-up: You are given a rooted binary tree with unique node ids and a list of ids to delete. When a node is deleted, promote all of its children to b...
Decide target via subsequence plus/multiply expression
Question Given a sequence of positive 32-bit integers A and an integer target, determine whether there exists a subsequence of A (preserving order, us...
Debug Queues and Solve Arrays
During the coding rounds, the interviewer asked several implementation problems: 1. Debug a priority queue. You are given an array-backed min-heap. Th...
Evaluate query ratios from equations
You are given equations of the form A / B = value where A and B are variable names (strings) and value is a positive real number. You also receive que...
Implement store, evaluator, and parser
The interview included several independent coding problems: 1. Implement an in-memory key-value store. Start with basic put/get operations, then exten...
Reconstruct a binary tree from traversals
Coding: Build a Binary Tree from Two Traversals You are given two integer arrays representing traversals of the same binary tree: - preorder: node ord...
Find Shortest Queue with Few Calls
You are given a list of queues of integers. For each queue, the only available operations are isEmpty() and poll(), where poll() removes and returns t...
Design a contiguous segment allocator
Design an in-memory contiguous segment allocator over an array of n cells (indexed 0..n- 1), all initially free. Support two operations: 1) allocate(l...
Reverse Words While Preserving Spaces
Implement a C++ function that reverses the order of words in a string. Assume a word is any maximal sequence of non-space characters, and the input co...
Apply Range Overwrite Queries
You are given an integer array nums of length n and a list of range-assignment queries. Each query is a tuple (left, right, value), where left and rig...
Detect currency arbitrage with costs
You are given a K×K matrix R of currency exchange rates where R[i][j] is the amount of currency j obtainable for one unit of currency i, and R[i][i] =...
Solve Parser, Trading, Tree, And Deck Tasks
You will solve several independent programming tasks. For each task, implement clean, tested code and state the time and space complexity. 1. Validate...
Minimize calls to find all bad test pairs
You have \(n\) atomic tests \(t_1, t_2, \dots, t_n\). You are given access to a black-box function: `python bool runTest(set<Test> S) ` which behaves ...