Coding & Algorithms Interview Questions
Practice 2,950 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."
Compute decayed power levels in a graph
You are given an unweighted graph representing a network of wires. - The graph has N nodes labeled 0..N-1 and M edges (each edge is a bidirectional wi...
Build span trees from unordered trace spans
You are given an unordered list of span objects. Each span is a map/dictionary containing at least: - span_id (string, unique) - parent_id (string or ...
Parse code into operation triads IR
Problem: Operation-Triads Parsing (Mini Language) You are given a small, line-based programming language consisting of assignment statements and non-n...
Compute Minimum Production Days
Question You are given a list of product IDs products, where products[i] is the type of the product that must be produced at step i, and a non-negativ...
Explain C++ vector, unordered_map, and virtual functions
In C++, explain: - The amortized and worst-case time complexity of vector::push_back, and how capacity growth/expansion is implemented (growth factor,...
Find the longest palindromic substring
Problem Given a string s, find the longest contiguous substring of s that is a palindrome (reads the same forward and backward). Input - A string s co...
Compute final prices with next smaller discount
You are given an integer array prices of length n, where prices[i] is the original price of the i-th item. For each item i, find the first index j > i...
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 a resumable data loader
Problem: Resumable DataLoader You are implementing a mini data-loading component for model training. Design a ResumableDataLoader that iterates over a...
Implement BST Iterator and Ticket Queue
The coding interviews mentioned two algorithm/data-structure tasks: 1. Implement a binary search tree iterator. You are given the root of a binar...
Solve palindrome and list tasks
You are asked to solve two coding problems. 1. Build the shortest palindrome by prepending characters: Given a string s, add characters only to the fr...
Highlight Exact Source Matches
You are given a string text and a list of strings sources. For every exact occurrence of any string in sources within text, wrap the matched character...
Support updates and count target-sum pairs
You are given two integer arrays: - A (fixed / primary) - B (modifiable / secondary) You must process a sequence of operations of two types: 1. Update...
Compute top-N items from log stream
Problem You are given application logs containing events with an itemId. Each log line may contain extra fields, but you can extract the itemId from e...
Design a weighted random value generator
Weighted random value generator Design a generic component that stores values with integer weights and can return a random value with probability prop...
Compute balances, rejections, and platform reserve
You are given a set of transactions in CSV-like format with columns: - account_name, timestamp, currency, amount Assume: - Transactions for all accoun...
Format text into fixed-width justified lines
You are given an array of strings words (each string is a word with no spaces) and an integer maxWidth. Return a list of lines (strings) that formats ...
Validate whether brackets are properly nested
Problem: Validate a bracket sequence Given a string s consisting only of the characters '(', ')', '{', '}', '[', ']', determine whether the string is ...
Assign meetings to rooms with delays
You are given: - An integer n (number of meeting rooms, labeled 0..n-1). - A list of m meetings meetings[i] = [start_i, end_i) with start_i < end_i. A...
Implement sparse matrix storage, addition, and multiplication
Design a way to store a sparse matrix (most entries are zero) and implement efficient operations. You are given matrices using their non-zero entries:...