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."
Merge Two Sorted Lists
You are given the heads of two singly linked lists, each already sorted in non-decreasing order. Merge them into one sorted linked list and return the...
Resolve routing-number to bank mapping
You are given bank-routing data coming from one or more JSON sources. Each source provides a list of records like: `json { "routing": "026009593", "ba...
Implement stack variants and upward path sum
Question Answer the following coding questions. They progress from augmented stacks to streaming statistics to tree path reasoning. 1. MinStack — Desi...
Count nonnegative buy/sell sequences
You must perform exactly 2n unit trades starting with 0 shares and ending with 0 shares. Each trade is either a buy (+1 share) or a sell (−1 share), a...
Implement a timestamped map
Implement an in-memory timestamped map. Support these operations: - put(key, value, timestamp): store value for key at the given integer timestamp - g...
Remove minimum invalid mixed brackets
Given a string s containing letters and bracket characters from the set (), [], {}, remove the minimum number of bracket characters so that the result...
Count islands by requested sizes
You are given a 2D grid of characters '0' and '1', where '1' represents land and '0' represents water. An island is a maximal group of horizontally/ve...
Return a topological ordering of a graph
Problem: Output a topological ordering Given a directed graph with n nodes labeled 0..n-1 and a list of directed edges edges, return a topological ord...
Design O(1) cache and moving average
Problem You are asked two coding questions: 1) O(1) cache data structure Design a data structure that supports the following operations in O(1) averag...
Compute minimal operations and optimal server pairing
You are given two independent coding problems. Problem 1: Minimum range-increments to make an array nondecreasing Given an integer array power of leng...
Schedule dependent services with layered startup
You are given N services and dependency pairs (u -> v) meaning u must start before v. 1) Produce a valid startup order if one exists; otherwise detect...
Design a Randomized Multiset
Implement a data structure for integers that allows duplicate values and supports the following operations in expected O(1) time: - insert(val): Add o...
Approximate Pi from Random Points
You are given an array pts of points in the unit square. Each point is represented as an array of two numbers [x, y], where 0 <= x <= 1 and 0 <= y <= ...
Minimize batches and allocate riders by time
Coding prompts (same interview round) 1) Minimum number of batches for time points You are given a list of event time points (integers), e.g. [1, 3, 5...
Solve palindrome and missing-number variants
You are asked to solve two coding problems and analyze the time and space complexity of each. 1. Palindrome check Given a string s, determine whe...
Implement logger and card ranking
This coding round contains two independent implementation tasks. Task A: Implement a configurable logger Implement a Logger component that accepts tex...
Build Event Notification Engine
You are implementing part of a marketing engine for an event marketplace. Assume the following data is available: - Customer: id, city, birth_month, b...
Choose fastest way to transfer 2 TB
You need to transfer a 2 TB dataset to someone located in San Francisco as fast as possible. - What transfer method(s) would you choose and why? - St...
Remove duplicates from a singly linked list
You are given the head of a singly linked list of integers. Modify the list in place so that it contains only the first occurrence of each value (i.e....
Implement a versioned recipe management system
You are asked to implement an in-memory Recipe Management System (similar in difficulty to a simple banking/in-memory DB exercise). The system support...