Coding & Algorithms Interview Questions
Practice 2,753 real Coding & Algorithms interview questions. From companies including Meta, Amazon, Google, Uber, TikTok. For roles like Software Engineer, Data Scientist, Machine Learning Engineer, Data Engineer.

"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 Valid IP Addresses in Files
You are given an absolute or relative path to a directory on the local file system. Write a program that recursively traverses every subdirectory unde...
Compute Roller Coaster Scores
You are given a list of roller coaster descriptions. Each description is a string in the format: <CoasterType> <MaxSpeed> <BumpsPerSecond> <LiftType> ...
Schedule Non-Overlapping Meetings Efficiently
Implement a meeting scheduler that stores meetings as half-open intervals [start, end), where start and end are integer timestamps and start < end. Th...
Find an Exit in a URL Maze
You are given a starting URL for a web-based maze. Each URL represents one room in the maze. Your task is to write a program that discovers whether th...

Implement a Dependency-Aware Task Scheduler
Implement a TaskManager class with two methods: - AddTasks(tasks): add one or more tasks into the system. - ConsumeTask(): return and remove the execu...
Build a Compose Rating Card
Implement an Android rating card using Kotlin and Jetpack Compose. Requirements: - The card lets the user provide a star rating and a written comment....
Implement a Referral Revenue Tracker
Implement an in-memory revenue tracking system for customers in a referral network. Each customer has their own direct revenue. A customer may also ha...
Implement Cache, Undo, and DFS
Answer the following independent coding prompts. 1. Timed cache: Implement a generic in-memory cache. Each inserted item has a fixed expiration time k...
Simulate In-Place Cellular State Updates
You are given an m x n grid of cells, where each cell is either 0 for inactive or 1 for active. All cells update simultaneously according to these rul...
Compute CDF from a PDF Function
You are given a callable function pdf(t) that returns the probability density of a normal distribution at value t. Implement a function cdf(x) that re...
Implement an In-Memory Database
Design and implement an in-memory database that stores records by key. Each record is a map from field to integer value. Implement the following funct...
Solve Two Backtracking Array Problems
You will solve two independent coding problems. For each problem, first discuss edge cases, then implement a correct solution, and finally explain how...
Convert IPv4 Ranges to CIDR Blocks
Implement a function that summarizes a consecutive IPv4 address range using the smallest possible list of CIDR blocks. You are given: - start_ip: a va...
Implement Document Predicate APIs
Design a simple document service that stores text documents identified by filename. Implement these APIs: - InsertDoc(filename, content): store or ove...
Compute Turnstile Crossing Times
You are given n people waiting to use a single-door turnstile. Each person has: - time[i]: the time when person i arrives at the turnstile. - directio...
Implement Cache and Rotate Matrix
Solve the following two independent coding tasks. Task 1: Implement an LRU Cache Design a data structure LRUCache that stores integer keys and integer...
Evaluate Symbol Expressions
You are given a map from symbol names to arithmetic expressions. Each expression may contain integer constants, other symbol names, parentheses, and t...
Design In-Memory QPS Counter
Implement an in-memory traffic counter. You need to support two operations for each logical key, such as an endpoint, customer, or service name: - rec...
Find the First Unique IP
You are processing a chronological stream of server hit records. Each record contains an IP address as a string. Design and implement a component that...
Implement a Coin-Constrained Jump Strategy
You are implementing an autopilot strategy for a simple side-scrolling jump game. A character moves forward automatically. On each game tick, your str...