Software Engineer Coding & Algorithms Interview Questions
Practice 2,442 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."
Solve Digit-Square and Grid BFS Problems
Solve the following coding problems. Problem 1: Digit-square convergence Given a positive integer n, repeatedly replace n with the sum of the squares ...
Find optimal commute mode in a city graph
You are designing a route planner that suggests the best way to commute between two points in a city using different transportation modes. The city is...
Find numbers with exactly two sum-of-squares forms
Given an integer \(n\), find all integers \(s\) such that \(0 \le s < n\) and \(s\) can be expressed as a sum of two squares in exactly two distinct u...
Autoscale a Server Fleet from Throughput Readings
You run a service on a fleet of identical servers behind a load balancer. Each server can handle at most limit units of throughput. A monitoring syste...
Optimize C++ Performance with Provided Concurrency
Given a C++ codebase where threading components (threads, work queues, and synchronization primitives) are already provided, profile and optimize the ...
Implement hostname-restricted web crawler
Implement a single-threaded web crawler that, given a starting URL startUrl and an interface getUrls(url) that returns all hyperlinks on the page at u...
Solve six algorithmic problems
Answer the following independent algorithmic prompts. For each, explain your approach, justify data structures, analyze time/space complexity, and pro...
Find maximum cable length by cutting
You are given N cables with integer lengths and a target K. Cut the cables into pieces of equal integer length L to produce at least K pieces; maximiz...
Compute longest distinct substring, case-insensitive
Given a string s, return the length of the longest contiguous substring that contains no repeated characters, treating letters case-insensitively (e.g...
Design a transactional in-memory key–value store
Implement an in-memory key–value store that supports transactions. The system must process these commands: ( 1) SET key value — assign or overwrite a ...
Find minimal property set in neighborhood
You are given a list of properties, each Property(id: int, neighborhood: string, capacity: int). Given a targetNeighborhood (string) and groupSize (in...
Implement file deduplication at scale
Implement a command-line tool to find duplicate files in a directory tree. Use OS/pathlib primitives to recursively enumerate files. Apply prefilters ...
Implement a sliding-window hit counter
Implement a hit counter that supports recordHit(timestamp) and getHits(pastSeconds). Use a fixed-size array to maintain a sliding time window (e.g., l...
Find earliest time password becomes irrecoverable
You are given a password string of length n and an attack order array attackOrder[1..n], a permutation of 1..n. At second i (1-indexed), the virus rep...
Simulate stack traces from logs
Given a list of log entries describing function calls, each formatted as "<id> <event> <timestamp>" where event ∈ {START, END} and timestamps are inte...
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...
Detect n-length consecutive sequences
Given an unsorted collection of integers and a parameter n > 0, determine whether there exists a set of n distinct integers that form a run of consecu...
Count subarrays with odd zero count
Count subarrays with odd zero count Given an integer array nums, return how many contiguous subarrays contain an odd number of zeros. Provide an O(n) ...
Delete duplicate files via DFS
Question LeetCode 609. Find Duplicate File in System – Implement an algorithm (using DFS/backtracking) to delete files with duplicate content in a fil...
Design payment scheduler with cancel and top-K outgoing
Design and implement an in-memory banking payment component with the following APIs: ( 1) schedulePayment(payerId, payeeId, amount, executeAt) -> paym...