Software Engineer Coding & Algorithms Interview Questions
Practice 2,295 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 time-based key-value store
Design an in-memory key-value store that supports time-based lookups. Operations Implement a class (or module) with the following methods: 1. set(key,...
Implement custom iterator classes
Question Implement an iterator from scratch in a blank coding environment. Define the iterator interface manually. Implement two concrete iterator cla...
Design streaming window average processor
Question Design an event processor for an infinite out-of-order event stream (id, timestamp, payload, checksum). Validate checksum, discard events arr...
Design a stack with max removal
Design a stack-like data structure for integers that supports the following operations efficiently: - push(x): insert x onto the stack. - pop(): remov...
Compute longest increasing subsequence length
Coding Question You are given an integer array nums. Return the length of the longest strictly increasing subsequence (not necessarily contiguous). A ...
Find Missing Ranges with Bounds
Given a sorted array of distinct integers nums and two integers lower and upper that define an inclusive interval [lower, upper], return all maximal r...
Extract stream prefix before stop token
You are consuming a text stream delivered as an iterator/generator of string chunks (each chunk may be any length, including empty). You are also give...
Find root from child adjacency lists
You're given an unordered list describing a rooted n-ary tree. Each item is a record of the form {id: int, children: set<int>} listing a node's direct...
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...
Check balanced parentheses with multiple bracket types
Given a string containing only parentheses '()', determine whether it is balanced. Follow-up: extend the solution to also support '[]' and '{}' with c...
Implement precise string-based decimal addition
Given two non-empty strings representing decimal numbers (e.g., "123.456" and "6234.42432"), implement a function that returns their exact sum as a st...
Test easy–medium array/string tasks
For typical easy–medium array and string problems, list the most important edge cases you would test (e.g., empty input, single element, duplicates, a...
Approach verbose data-structure design
For a data-structure design problem whose behavior is easy to understand but whose implementation is lengthy, describe your step-by-step approach: cla...
Sort Three Categories In Place
You are given an array items containing only the values 0, 1, and 2, where each value represents a category. Rearrange the array in-place so that all ...
Compute expected days until no whole pills
A bottle initially contains H half-pills and W whole pills. Each day: 1. You randomly select one pill uniformly from the bottle. 2. If it is a half-pi...
Solve chat, grid paths, and car rentals
You are given three independent programming tasks. For each, describe and implement an efficient algorithm, and be prepared to analyze its time and sp...
Solve 15 common Apple coding questions
The post summarizes high-frequency coding problems reported for Apple Software Engineer interviews. Practice the following algorithm and data-structur...
Implement TTL Cache and Tree Balance Reporting
Complete both coding tasks. Task A: Time-limited cache Design and implement an in-memory cache where every key expires after a time-to-live duration. ...
Implement a Leaky Bucket Rate Limiter
Implement a leaky bucket rate limiter. You are given a class template for a rate limiter that controls whether incoming requests should be accepted or...
Implement an In-Memory File Storage System
Implement an in-memory file storage service. You need to support files identified by a unique full path string, such as "/docs/a.txt". Each file has a...