Software Engineer Coding & Algorithms Interview Questions
Practice 2,595 real Coding & Algorithms interview questions for Software Engineer roles. From companies including Meta, Google, Amazon, 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."
Implement basic expression evaluator
Implement a function to evaluate a string expression containing non-negative integers, '+', '-', '*', '/', and spaces. Multiplication and division hav...
Find missing ranges in interval
Given a sorted unique integer array nums and two integers lower and upper defining an inclusive interval [lower, upper], return all missing ranges not...
Find spammer with minimal hasMessaged calls
Question You have n accounts labeled 0..n-1 and an oracle API: ` boolean hasMessaged(a, b) // true iff account a has sent at least one message to ac...
Count islands with eight-direction adjacency
You are given an m×n grid of characters '1' (land) and '0' (water). Count the number of islands, where cells are connected if they touch in any of the...
Compute product excluding index without division
Given an integer array nums, return an array ans where ans[i] equals the product of all elements of nums except nums[i], without using division. Achie...
Solve k-Nearest Places by Latitude/Longitude
Given a set of geographic coordinates and a query point, return the k nearest locations. Describe how you compute great-circle distance (e.g., Haversi...
Find largest digit-sum bucket size
You are given two integers low and high (inclusive). Define s(x) as the sum of the decimal digits of x. For every integer x in [low, high], place x in...
Solve windowed duplicates and target expression
1) Windowed duplicate check: Given an integer array nums and an integer k, determine whether there exist indices i and j such that nums[i] == nums[j] ...
Design two-user communications handler with exceptions
Implement a two-user communications handler. Create: (A) CommsHandler(CommsHandlerABC) with methods connect(self, user1: Caller, user2: Caller) -> str...
Maximize tokens from nested crates
You are given n crates, each either locked or unlocked. Each crate i contains: an integer tokens[i]; a list of keys that can unlock other crates; and ...
Find the kth largest element
Given an unsorted array of n integers and an integer k (1 ≤ k ≤ n), return the k-th largest element without fully sorting the array. Design two method...
Find root IDs and paths
You are given a collection of string blocks, each represented as a JSON object with fields {"id": string, "parentId": string | null}. A block is a roo...
Compute distinct sums from limited coins
You are given two integer arrays, denom[0..n-1] and count[0..n-1], where denom[i] > 0 is a coin denomination and count[i] >= 0 is the number of availa...
Implement BFS shortest paths with reconstruction
Given an unweighted graph with n vertices and m edges represented as an adjacency list, implement breadth-first search (BFS) from a source vertex s to...
Implement LRU cache with O(1) ops
Implement LRU cache with O(1) ops Design and implement a fixed-capacity cache supporting get(key) -> value and put(key, value) in O( 1) average time. ...
Implement distinct islands and sliding maxima
Implement distinct islands and sliding maxima 1) Given a binary grid where 1 represents land and 0 represents water, count how many distinct island sh...
Design a snapshotable key-value store
Design a snapshotable key-value store Design and implement a snapshotable key–value map supporting the following APIs: - S(key, value): set the curren...
Find users with access to all cameras
Given entities and relationships (user, owns, camera), (user, belongs_to, group), (group, owns, camera), and (group, belongs_to, group) where groups c...
Compute binary tree diameter
Compute binary tree diameter Given the root of a binary tree, compute the tree's diameter defined as the maximum number of edges on any path between t...
Weighted LRU Cache: Capacity Counted by Item Quantity
Design a variant of the classic least-recently-used (LRU) cache. In the classic version, the capacity limits the number of items stored. In this varia...