Software Engineer Coding & Algorithms Interview Questions
Practice 2,712 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."
Add Dramatic Punctuation to Text
Add Dramatic Punctuation to Text Implement add_drama(text). Preserve all whitespace exactly. For each maximal non-whitespace token, first replace ever...
Banking System Simulation
Banking System Simulation You are building an in-memory banking system that is driven by a time-ordered stream of operations. Implement the system so ...
Select the Nearest Eligible Elevator
Select the Nearest Eligible Elevator You are given a list of elevators. Each elevator has a current integer floor and a state: "up", "down", or "idle"...
Count Words in Lexicographic Order
Count Words in Lexicographic Order Implement word_counts(words) for a list of lowercase words. Return a list of (word, count) pairs sorted in ascendin...
Simulate a Deterministic Finite Automaton
Implement a deterministic finite automaton simulator for the alphabet {a, b}. The automaton has states numbered from 0 through stateCount - 1. The tra...
List Unallocated Experiment Buckets
List Unallocated Experiment Buckets Problem An experiment system divides traffic into numbered buckets. Implement findUnallocatedBuckets(bucketCount, ...
Implement a Range Module with Add, Query, and Remove
Process Range Tracking Operations Implement processRanges(operations) -> queryResults. The tracker is initially empty. Process every operation from le...
Maintain an Out-of-Order Step Progress Tree
Maintain an Out-of-Order Step Progress Tree Each progress event contains: `text timestamp: integer step_id: integer parent_step_id: integer or null ru...
Allocate IPO Shares and Split a Weighted Tree
Two Allocation and Tree Problems Implement both independent parts. Part A - IPO Share Allocation Each bid is [user_id, requested_shares, price, timest...
Search a Rotated Sorted Array in One Binary-Search Pass
Search a Rotated Sorted Array in One Binary-Search Pass Problem Implement searchRotated(values, target) -> index. values was formed by taking a strict...
Kth Employee Reached in an Ordered Hierarchy
Kth Employee Reached in an Ordered Hierarchy Implement kth_recipients(boss, queries). Employees are numbered 0 through n - 1. boss[0] == -1; for every...
Circular Drone Hub Delivery Route
A drone delivery network is laid out as a ring of n hubs, numbered 0, 1, ..., n - 1. Each hub is connected by a direct air corridor to its two neighbo...
Determine Whether One Person Can Attend Every Meeting
Determine Whether One Person Can Attend Every Meeting Problem Implement canAttendAllMeetings(intervals) -> canAttend. Each meeting is a half-open inte...
Count Connected Groups in a Relationship Matrix
Count Connected Groups in a Relationship Matrix Problem Implement countConnectedGroups(related). related is an n x n relationship matrix encoded as an...
Sliding Window Average After Dropping the Largest Values
Compute one average per fixed-size sliding window after removing exactly the largest k values, counting duplicates separately. Support negative number...
Return the K Closest Points with Deterministic Ties
Return the K Closest Points with Deterministic Ties Implement k_closest(points, target, k). Each point and the target are integer pairs. Return exactl...
Find the Longest Run of One Character
Find the Longest Run of One Character Problem Implement longestIdenticalRun(text) -> length. Return the maximum number of consecutive positions contai...
Return the K Smallest Values from Sorted Arrays
Return the K Smallest Values from Sorted Arrays Problem Implement kSmallestFromSortedArrays(arrays, takeCount) -> values. Each inner array is sorted i...
Generate Every Ordered Sum Using Ones and Twos
Generate every ordered string of ones and twos whose digit values sum to a target integer, with no duplicates and lexicographic output. The problem te...
Maximize Revenue With Two Contiguous Delivery Routes
Problem Houses lie in a line. values[i] is the nonnegative payment for delivering to house i. Two delivery robots are available. Robot one can serve a...