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 banking ops: transfer, top-k, cashback, merge
Design and implement an in-memory banking system that supports: ( 1) CreateAccount(id, initialBalance) and Transfer(fromId, toId, amount) with validat...
Find maximum cable length by cutting
You are given N cables with integer lengths and a target K. Cut the cables into pieces of equal integer length L to produce at least K pieces; maximiz...
Insert and merge an interval
You are given a list of pairwise non-overlapping closed intervals [si, ei] sorted by start time, and a new interval [s, e]. Insert [s, e] into the lis...
Optimize flight costs and find grid path
1) Given two integer arrays D and R of equal length n, where D[i] is the cost to depart on day i and R[j] is the cost to return on day j, choose indic...
Implement a Timestamped Banking System
Implement an in-memory banking system that processes API calls in nondecreasing timestamp order. Support the following operations: - create_account(ti...
Find maximum collinear points
Given a list of 2D points with integer coordinates, return the maximum number of points that lie on the same straight line. Input - points: a list of ...
Solve listed algorithm problems
The interview note referenced several independent coding problems. Solve each one independently. 1. Median of two sorted arrays You are given two...
Design Tic-Tac-Toe With K Players
Design and implement a Tic-Tac-Toe game engine. You are given: - k players, each with a unique player ID or mark. - An n x n board, initially empty. -...
Detect cycles and break them in pod dependencies
You are given dependencies between software pods. Each dependency is a directed edge u -> v meaning pod u must be built/installed before pod v. Part 1...
Find all quadruplets summing to target
Problem Given an integer array nums (length n) and an integer target, return all unique quadruplets [a,b,c,d] such that: - a + b + c + d == target - T...
Solve four OA string/array/matrix/graph tasks
You have 4 independent coding tasks. 1) Uppercase vs lowercase count difference Given a string s consisting of ASCII letters (and possibly other chara...
Identify read-only files from permission records
You are given a list of file metadata records. Each record contains: - owner (string): the username who owns the file - permission (string): a Unix-li...
Implement bitmap font render/compress/invert
Bitmap Character to Image Conversion (3 phases) You are given a bitmap lookup table (a dictionary/map) that represents a tiny “font”. - Key: a charact...
Zero out duplicates and sort an array
Coding question You are given an integer array arr of length about 75. - The data is not sorted. - The array may contain duplicate values. - You must ...
Compute total revenue from greedy VM rentals
You manage n VM types. VM type i starts with inventory a[i] (number of available instances). There are m customers arriving one by one. For each custo...
Determine feasibility and clean parentheses string
You are given two independent coding tasks. 1) Check if all courses/tasks can be completed You have n courses labeled 0..n-1 and a list of prerequisit...
Count integer pairs satisfying 1/x + 1/y = 1/N
You are given a positive integer N (\(1 \le N \le 10^6\)). Consider the Diophantine equation: \[ \frac{1}{x} + \frac{1}{y} = \frac{1}{N}, \] where x a...
Check feasibility of AI course schedule
You are designing a learning path for n AI-related courses, labeled from 0 to n - 1. Some courses have prerequisites. For example, to take course b, y...
Trace code and find frequent character
1) Trace a simple algorithm: Given a short loop-and-conditional pseudo-code operating over an integer array, trace the values of key variables (e.g., ...
Solve string partition and equal-sum package problems
1) Given a string itemCategories (lowercase English letters) and an integer k (0 ≤ k ≤ 26), count the number of indices i (1 ≤ i < n) that partition t...