Coding & Algorithms Interview Questions
Practice 3,013 real Coding & Algorithms interview questions for 2026. Coding & Algorithms interview questions for top tech firms like Meta, Amazon, Google, Uber, and TikTok — real questions from actual interviews with detailed solutions — to power your interview preparation. This collection is sharply focused on algorithmic patterns (arrays, strings, sliding windows, trees/graphs, dynamic programming, greedy, two-pointers, and hashing), clean, review-ready code, and the explanation skills that distinguish hires. In 2026 expect familiar medium-to-hard problems plus newer twists: AI-enabled or multi-file coding rounds at some companies, more emphasis on explainability and edge-case reasoning, and occasional real-world performance constraints (streaming, concurrency, memory limits). Interviewers evaluate problem framing, algorithm choice, complexity trade-offs, test-case thinking, and communication under time pressure. Best prep mixes pattern-based practice, timed mock interviews, code-review style polishing, and rehearsed explanations of complexity and tradeoffs. Focus your last-mile prep on writing correct, readable code quickly and on explaining why your solution is robust and efficient for production scenarios.

"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."
Maximize optional tasks under daily limit
You are given an integer limit and two integer arrays required and optional of length n. For each day i, you must schedule required[i]. If time remain...
Design a queue and analyze tradeoffs
Design a FIFO queue data structure that supports enqueue, dequeue, peek, and isEmpty. Compare implementations using a singly linked list, a dynamic ar...
Design a rolling five-minute hit counter
Design an in-memory hit counter that supports: ( 1) recordHit(timestamp) to log an event, and ( 2) getCountLast5Minutes(now) to return the number of e...
Implement power and balance-parentheses algorithms
Design and implement two algorithms: 1) Fast exponentiation: Implement a function pow(x, n) that returns a real number x raised to an integer exponent...
Implement a tennis score tracker
Design and implement a tennis game scoring function. Input: a stream of points won by players 'A' or 'B' (e.g., A, B, B, B, B). After each point, outp...
Debug and Fix Failing Unit Tests in Java
You receive a small Java project for a credit-card rewards service with three failing unit tests: calculatesTriplePointsForRestaurants, returnsUnknown...
Compute build order from dependencies
Given a set of package build dependencies, output a valid build order so that each package is built only after all of its dependencies. The input is a...
Implement a Simulated Memory Allocator
Implement a simulated memory allocator that supports allocate(size) and free(ptr) operations analogous to malloc and free. Treat memory as a contiguou...

Compute community ranges and town idle hours
You are given two in-memory datasets for a party-planning app. 1) PartyWindow: {partyId: string, startTime: ISO-8601 UTC datetime, endTime: ISO-8601 U...
Compute delivery times on a grid
You are given a 2D grid with cells marked as 'M' (warehouses), 'C' (customers), 'X' (obstacles), and '.' (roads). You can move up, down, left, or righ...
Implement sampling and subarray algorithms
This coding round contained two algorithmic prompts: uniform sampling in a 2D square and longest increasing contiguous subarray. Constraints & Assumpt...
Write SQL and merge linked lists
The technical interview included two coding-style tasks: a SQL analytics query and merging two sorted linked lists. Constraints & Assumptions - For SQ...
Implement a Timed Task Scheduler
Implement a runnable task scheduler. The scheduler should allow clients to add new tasks at any time. Each task has: - A callback or function to execu...
Find missing number from concatenated digits
Given an integer n (1 ≤ n ≤ 99) and a digit string s formed by concatenating the decimal representations of the integers 1..n except for one missing n...
Evaluate expression without stack, constant space
Question Given a string s representing a valid arithmetic expression of non-negative integers, the operators +, -, `, /, and spaces (there are no pare...
Explain algorithm strategies and complexity
You are faced with a complex, potentially ambiguous coding problem. Describe how you would clarify requirements, identify constraints, propose multipl...
Determine if robot path is bounded
A robot starts at (0, 0) facing North on an infinite grid. It executes a string s consisting of 'G' (move forward 1 unit), 'L' (turn left 90°), and 'R...
Compute sum of minima with removals
You are given an array weights[0..n-1] of positive integers representing product weights in a line. Repeat until no products remain: choose the lighte...
Compute Max Score From Up to 3 Categories
You are implementing a scoring function for a library summer reading program. Each book a student read is represented as a tuple (category: str, point...
Maximize Profit From Cutting Rods
Given an array lengths where lengths[i] is the length of the i-th rod, determine the maximum profit obtainable by choosing a single integer saleLength...