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."
Return all valid word-break sentences
Given a string s and a dictionary of strings wordDict, insert spaces into s to form a sentence such that every token is in wordDict. Return all possib...
Answer common graph, grid, and array tasks
Problem 1: Largest continuous island after filling sea (1D) Humans can convert ocean cells into land by filling them. Input - islands: a 1D array of l...
Minimize operations to reduce integer to zero
You are given a non-negative integer n. In one operation: - If n is even, you may replace n with n / 2. - If n is odd, you may replace n with either n...
Solve Two Array Optimization Problems
This online assessment included two coding problems. Problem 1: Maximize protected city population You are given: - an integer n - an array population...
Evaluate Arithmetic Expressions
Implement a function that evaluates a string arithmetic expression. Base problem: - The input is a string s containing non-negative integers, spaces, ...
Solve sliding-window, flattening, decode, and O(1) random set
You are given four independent coding tasks. For each, describe your approach, time complexity, and handle edge cases. 1) Longest substring without re...
Implement Recipe Storage CRUD
Implement an in-memory RecipeStore that supports CRUD operations for recipes. Each recipe contains: - id: a string identifier in the form recipe<n> - ...
Compute unique-dasher concurrency with tie-breaking
You are given N delivery assignments, each as (dasherId, startTime, endTime) with 0 <= startTime < endTime. A single dasher may hold multiple overlapp...
Implement a single-producer multi-consumer ring buffer
Implement a fixed-capacity ring buffer in C++ for a setting with one producer and multiple consumers. Design a class that stores integers in a preallo...
Predict most likely next word from training data
You are given tokenized training data consisting of multiple sentences (each sentence is a list of words). Build a lightweight model/data structure th...
Solve interval, grid-fill, and heap tasks
You are asked to solve the following algorithmic problems. Problem 1: Concurrent users from online intervals You are given n inclusive time intervals ...
Maximize distinct values after unique ± offsets
Problem You are given an integer array a of length n and a non-negative integer k. For each index i, you must choose: - an integer offset d_i such tha...
Remove adjacent duplicates and handle tree input
You are asked three related coding questions. 1) Remove adjacent duplicates (repeatedly) Given a string s (lowercase English letters), repeatedly remo...
Implement an event emitter
Implement an EventEmitter class for a frontend environment. The class should support these methods: - on(eventName, listener): register a listener fun...
Compute Remaining GPUs With Switching Limits
Suppose you manage n GPU clusters with fixed daily capacities capacity[i]. Each day starts fresh with the full capacity, because all GPUs are returned...
Implement follow graph with snapshots and recommendations
Design and implement an in-memory “social network” component that supports following/unfollowing, point-in-time (snapshot) queries, and a simple recom...
Design autocomplete with Trie
Design and implement an autocomplete service using a prefix tree (Trie). Support operations insert(word, weight), update(word, newWeight), delete(word...
Delete a Character From Cover
You are given a source string book and a cipher represented by a list of inclusive index intervals cover = [(l1, r1), ..., (lm, rm)]. The decoded ciph...
Debug Queues and Solve Arrays
During the coding rounds, the interviewer asked several implementation problems: 1. Debug a priority queue. You are given an array-backed min-heap. Th...
Can You Reach the Last Index?
You are given an array nums of non-negative integers. You start at index 0. From index i, you may jump to any index j such that i < j <= i + nums[i]. ...