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."
Determine winner in stack-merging game
Game: Babylon stack merging (two-player, perfect play) You are given a two-player turn-based game. There are n stacks of tiles. Each stack has: - a he...
Reconstruct original array from doubled shuffle
Problem You are given an integer array changed that was produced from some unknown integer array original using the following process: 1. Start with o...
Count completed car journeys from sensor logs
You are given a time-ordered list of highway sensor logs. Each log entry contains: - timestamp (integer; strictly increasing) - sensor_type (one of "E...
Compute tree right view and target-sum subarrays
You are given two separate programming tasks. --- Task 1: Right-side view of a binary tree You are given the root of a binary tree. Imagine standing o...
Refactor a chat message processing function
Task You are given a poorly written JavaScript function that processes an incoming chat message and updates an in-memory store. The code is hard to re...
Validate Password Against Multiple Rules
Implement a password validation function for an account security system. You are given: - a string password - an integer min_length - a set of forbidd...
Check if each recipe is a contiguous subsequence
You are given: - An ordered ingredient list ingredients[0..n-1]. - A list of m recipes. Each recipe recipes[j] is itself a list of ingredients and is ...
Break a palindrome to smallest non-palindrome
Given a palindromic string s of lowercase English letters, change exactly one character to obtain a new string that is not a palindrome and is lexicog...
Implement classes within an abstract Python framework
You are given an existing Python codebase (~200 lines shown) that defines an abstract base class DataProcessor with abstract methods load(self), trans...
Implement a nested key-value store
Design and implement a nested key–value store that supports set(path, value), get(path), and delete(path), where path is dot-delimited (e.g., "a.b.c")...
Compute peak concurrent drivers in 24 hours
Given delivery intervals across multiple drivers, compute the maximum number of distinct drivers simultaneously active within the last 24 hours from a...
Implement queue-based rate limiter with multi-key limits
Implement a rate limiter with method allow(timestamp) that returns true if a request is allowed under a limit of K requests per rolling window W milli...
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...
Find word sequence with 1–2 char changes
Given a beginWord, an endWord, and a dictionary (wordList) of unique same-length lowercase words, determine whether there exists a transformation sequ...
Implement a recency-eviction bounded cache
Implement an in-memory key–value store with a fixed capacity N that uses recency-based eviction. Support: get(key) -> value or -1 if missing, and put(...
Differentiate Java final, finalize, finally
Differentiate Java's final, finalize, and finally. Define what final means for variables, methods, and classes and give examples; explain what finaliz...
Compute optimal matrix multiplication order
Given an array dims[0..n] where matrix i has dimensions dims[i-1] × dims[i] (for i = 1..n), compute the minimum number of scalar multiplications neede...
Solve and optimize menu combo DP
Given up to N different menu items, each with a unit price, and a list of combo offers where each offer specifies quantities for some items and a tota...
Pass functions and analyze basic data structures
Implement a function applyTwice(f, x) that accepts a function f and a value x and returns f(f(x)) in your preferred language. Demonstrate how to pass ...
Find returning users from access logs
Given an unordered log of web access events, identify which users are returning (i.e., they have visited on at least two different calendar days). Eac...