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 randomized Quickselect without k-shift bug
Implement randomized Quickselect to return the k-th largest element (1-based k, 1 ≤ k ≤ n) from an unsorted integer array. Use an in-place partition t...
Compute 95th-percentile call concurrency
Given N call sessions as half-open intervals [start, end) in UNIX seconds, design an algorithm to compute the 95th percentile of per-minute concurrent...
Solve two-pointer, sliding-window, and string tasks
Solve the following three coding tasks: 1) Two-pointer in-place de-duplication: Given a non-decreasing integer array nums and an integer k >= 1, modif...
Design streaming new-vs-returning monthly metrics
Streaming design: Monthly NEW vs RETURNING request shares (event-time, with late/out-of-order and duplicates) Context You receive a high-volume event ...
Implement TF–IDF with sparse matrices
Implement TF–IDF from Scratch (Python + NumPy/SciPy) You are given a list of documents (plain strings). Implement a TF–IDF vectorizer from scratch — n...
Analyze DFS, BFS, and A* trade-offs
Given a weighted graph with nodes {S,A,B,C,D,G} and edges: S–A(2), S–B(5), A–C(2), B–C(1), C–D(2), D–G(1), B–G(20). Heuristic for A*: h(A)=4, h(B)=3, ...
Design and explain robust web APIs for ML inference
Design an HTTP API for Image-Based Model Predictions Context: Design an HTTP REST API that serves predictions for image inputs (e.g., classification, ...
Increment Digit Array
Given a non-empty array of digits representing a non-negative integer, add one to the integer and return the resulting array of digits. Assumptions: -...
Count Special Index Pairs
Given an integer array nums of length n, count the number of index pairs (i, j) such that: - 0 <= i < j < n - nums[i] * nums[j] is even - j - i is odd...
Solve palindrome-check and vertical-order traversal
You are asked to solve two separate coding questions. You do not need to run code; be prepared to explain your approach and walk through examples. Que...
Solve common data-structure and puzzle problems
Solve the following independent problems (language of your choice; assume typical 32/64-bit constraints): 1) Reverse a singly linked list - Given the ...
Implement composition and mixin utilities
Solve the following two Python tasks. Part A: Implement function composition Implement a Python function compose(*funcs) that: 1. Accepts any number o...
Count Numbers With Odd Zeros
Given an array a of non-negative integers, count how many elements contain an odd number of digit '0' in their decimal representation. Notes: - Treat ...
Validate a 9×9 grid under constraints
Problem You are given a 9×9 grid representing a partially filled puzzle. Each cell contains either: - a digit character '1'–'9', or - the character '....
Implement inventory allocation with backorders
Design and implement a function to process an event stream for an e-commerce marketplace. Input: ( 1) initial inventory as a list of (sku: string, qty...
Implement ad matching and delivery routing
Part A: Implement a data structure for an ad-matching service that supports add(campaign), remove(campaign), and match(request), where a request has a...
Solve library coding tasks in Python
Implement the following Python tasks: 1) Given a list of (category, points) for books, choose up to 3 books with all different categories to maximize ...
Compute build order from dependencies
You are given a directed graph represented as a mapping where each key X maps to a list of tasks that depend on X (i.e., X must be completed before ea...
Compute minimal cost to merge numbers
Given an array of positive integers, you may repeatedly perform the following operation until one number remains: choose any two numbers x and y, pay ...
Decide string transform with directional tokens and walls
You are given two equal-length strings start and target of length n, each consisting only of the characters 'L', 'R', '.', and 'X'. A dot '.' represen...