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."
Implement alert queries and spike detection
You are building an in-memory alert analytics component. Each alert has: - timestamp (integer seconds since epoch) - severity (one of a small fixed se...
Design dynamic weighted random sampling with updates
Problem: Support weighted random sampling with insert/delete Design a data structure that maintains a dynamic set of items, each with a positive integ...
Design structure for insert and k-th largest
Design a class that supports two operations over a multiset of integers (duplicates allowed): - insert(num: int) -> void: add num to the data structur...
Solve common interview coding problems
You are given several independent coding tasks (typical of SWE/MLE interview rounds). For each task, design an algorithm and describe the time/space c...
Implement a sliding-window rate limiter allow()
Problem Implement a sliding-window log rate limiter. Design a class RateLimiter initialized with: - maxRequests (e.g., 100) - windowMillis (e.g., 60_0...
Implement type AST and infer generics
Toy language type system: AST + generic inference You are implementing a tiny type system for a toy language with: - Primitive types: char, int, float...
Delete a Node From a Search Tree
You are given the root of a binary search tree and an integer key. Delete the node whose value equals key, if it exists, while preserving the binary s...
Solve substring and access-log problems
The interview included the following coding tasks: 1. Longest uniform substring after limited changes Given a string s consisting of uppercase En...
Traverse org chart level by level
Problem You are given an organization chart as manager relationships. Each employee is represented by: - employee_id (string/int) - manager_id (string...
Track Highest-Earning Experience
You are building a core component for a real-time analytics system that tracks the profitability of experiences on a large online platform. Implement ...
Design a time-versioned key-value store and find common free time
You are given two coding tasks. Task 1: Time-versioned key-value store Design an in-memory data structure that supports: - set(key, value, timestamp):...
Rotate a Matrix In Place
Given an n x n matrix of integers, rotate the matrix 90 degrees clockwise. Implement the function in Python. You may use a straightforward approach wi...
Solve set equality and ad log top‑K
Problem Set (Coding) 1) Check whether two sets are equal You are given two integer arrays A and B that represent sets, except they may contain duplica...
Detect and remove matched words in a char stream
You are processing a stream of characters (arriving one-by-one). You are also given a list of target words. Each time a new character arrives, it is a...
Find the Shortest Target-Sum Path
Given the root of a binary tree and an integer targetSum, find a root-to-leaf path whose node values add up to targetSum. Return the path as a list of...
Solve tree equality and valid parentheses
You are asked to solve two independent coding questions. 1) Compare two binary trees for equality Given the roots of two binary trees p and q, return ...
Find the Slowest Function from Profiler Events
You are given a time-ordered profiler event log for a single-threaded program. Each event is one of: - START functionName timestamp: execution enters ...
How would you sort filenames with numeric segments?
You are given a list of filename strings (e.g., "file10.txt", "file2.txt", "10file.txt"). Implement a custom sort for these strings using a comparator...
Implement a multithreaded task executor with semaphores
Design and implement a thread-safe TaskExecutor that limits concurrent work using a semaphore-like mechanism. You are given an interface similar to: -...
Compute 5-minute rolling average load
You are building a monitoring component for a key–value (KV) store. Each request contributes 1 unit of load at its request time. Design a data structu...