Coding & Algorithms Interview Questions
Practice 2,960 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 a crash-resilient LRU cache
Implement an LRU-based memoization helper with behavior similar to a standard Python LRU cache. You are given an interface like this: `python class LR...
Compute Balances and Minimize Settlements
You are building a daily ledger service. A transaction record has three fields: timestamp, user_id, and delta_amount. delta_amount can be positive or ...
Implement command-driven in-memory key-value database
Implement a command-driven in-memory key–value database. Supported commands (one per line): 1) SET key value 2) GET key → print value or NULL 3) DELET...
Design Spreadsheet Formula Cells
Design an in-memory spreadsheet that supports assigning either literal integer values or formulas to cells. Cells are identified by names such as A1, ...
Implement string-based rounding without floats
Coding You are not allowed to parse the input into a built-in floating type (to avoid overflow and precision issues). Work directly on strings. 1) Imp...
Find largest connected group of overlapping intervals
You are given n people, where person i works during an inclusive time interval [start_i, end_i]. Define a communication graph: - Each person is a node...
Design a dynamic leaderboard with rank queries
Problem: Dynamic Leaderboard You are asked to implement a leaderboard that maintains scores for a set of elements (e.g., players/items). Scores can ch...
Find the First Unique Log
You are given a list of log entries in the order they were produced. Each log entry can be treated as a string. Return the first log entry that appear...
Count Connected Components in an Undirected Graph
You are given n nodes labeled from 0 to n - 1 and a list of undirected edges. Each edge is represented as a pair [u, v], meaning there is an undirecte...
Compute total active time per Twitter Space
You are given an event log of user activity in Twitter Spaces. Each record has: - operation: one of create, join, leave - space_id: identifier of the ...
Find minimum reversals to orient edges away from root
You are given a connected graph with n nodes labeled 0..n-1 and n-1 directed edges. If you ignore edge directions, the edges form a tree. Each directe...
Traverse a path and print directory tree
Problem (Node.js) You are given an absolute or relative file-system path rootPath. Write a Node.js function/program that: 1. Validates that rootPath e...
Design a constrained cache and secure string validator
Part A — Constrained cache (LRU-like) Design an in-memory cache that supports the following operations: - get(key) -> value | null - put(key, value) -...
Return all files under a path
You are building a simple file crawler. Task Implement an API/function: - Input: a filesystem path rootPath - Output: a list/array of all file paths c...
Compute peak busy dashers with overlaps
You are given delivery logs as (dasherId, startTime, endTime) with integer times, where endTime is exclusive. A single dasher may accept multiple orde...

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...
Generate NFT metadata and ensure uniqueness
You are implementing an NFT metadata generator. Each NFT is defined by selecting exactly one trait value from each trait category. You must generate a...
Compute Jaccard similarity between two strings
Jaccard Similarity of Two Strings Given two strings a and b, compute their Jaccard similarity based on token sets. Tokenization rules - Convert to low...
Implement a simplified grep with extensible flags
Problem Implement a simplified version of grep that searches a text file and returns the lines that match a given query string. You should focus on cl...
Implement Memory Allocation and In-Memory Records
Solve the following two implementation problems. Problem A: First-Fit Memory Allocator You are given a contiguous block of memory containing n units, ...