Software Engineer Coding & Algorithms Interview Questions
Practice 2,743 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."
Find minimum days to deliver all orders
You manage N delivery centers labeled 1..N and an array orderCityList where each element is the destination city of one order (city IDs are in 1..N). ...
Implement flat_map and design wealth redistribution
Part 1 — Implement a flat_map: Design and implement an associative container flat_map backed by a sorted dynamic array of (Key, Value) pairs. Support ...
Solve grid path and robot navigation
Part A — Shortest path in a grid with obstacles: Given an m×n grid of 0/1 cells (0 = open, 1 = obstacle), start at (0, 0) and end at (m−1,n− 1). You m...
Implement expression expansion to plus-only form
Given a string expression consisting only of lowercase letters (variables), '+', '*', '(', and ')', return an equivalent expression that uses only '+'...
Implement Luhn-based card validation and inference
Question Implement a set of utilities for credit-card validation and inference using the Luhn checksum algorithm and standard brand patterns. Brand pa...
Calculate trapped water between elevation bars
Given an array of non-negative integers representing the heights of unit-width vertical bars, compute the total water retained after rainfall. Start b...
Solve Banana Speed and Interval Merge
During two technical phone screens for a new graduate software engineering role, the candidate was asked to solve two coding problems: minimum eating ...
Solve Grid and Counting Problems
A software engineering intern phone screen included two coding tasks: 1. Count islands in a grid Given an m x n grid of characters where '1' re...
Implement a Hash Map with Separate Chaining and Resizing
Implement a hash map data structure from scratch, without using any built-in hash table types from your language's standard library (no dict, HashMap,...
Solve classic array, graph, and parsing problems
Implement and analyze solutions to the following independent tasks: 1) Expression evaluator: Given a string s of digits, '+', '-', '*', '/', and space...
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 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 array and tree algorithm challenges
Solve the following three algorithmic tasks: 1) Unique triplet sum: Given an integer array nums and an integer target (default 0), return all unique t...
Design BFS to detect forced win in Tic-Tac-Toe
You are given an n×n Tic-Tac-Toe–like board and a target k (1 ≤ k ≤ n). From the current board state and the player to move, design an algorithm to de...
Validate and restore IPv4 addresses
Design and implement the following IPv4 tasks. a) Validate dotted IPv4: Write a function isValidIPv4 (s) that returns true if s is a valid dotted-deci...
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...
Compute maximum sum in a tree without adjacency
Given a tree where each node has an integer value, select a subset of nodes to maximize the sum under the constraint that if you choose a node, you ca...
Remove runs of length at least k
Given a string s and an integer k (k >= 2), repeatedly remove every maximal contiguous group of the same character whose length is at least k, deletin...
Design a referral leaderboard with chain-based counts
Design and implement a function that generates a referral leaderboard for a platform, given two equal-length arrays rh_users and new_users representin...
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 ...