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 binary encode/decode with frequency tree
Problem Implement a binary encoding and decoding scheme for strings based on character frequencies (Huffman-like coding). You must implement two funct...
Merge overlapping 2D line segments
You are given a list of 2D line segments. Each segment is represented as a list of 2D points [(x1,y1), (x2,y2), ...] that all lie on the same straight...
Implement a custom list with iterator and map
You are asked to implement a simple generic list type without using any built-in collection classes (e.g., no ArrayList, LinkedList, Vector, etc.). Yo...
Compute minimum rooms for meeting schedule
Problem You are given a list of meetings, where each meeting is represented as a pair of integers [start, end] (with start < end) indicating the meeti...
Design a restaurant waitlist system
You are implementing the waitlist system for a restaurant. Parties arrive over time, can cancel, and get seated when a table becomes available. Rules ...
Maximize sum of non-adjacent values
Problem You are given an integer array nums representing the amount of money available at each house along a street. If you take money from house i, y...
Find a secret word using match feedback
You are given a list of unique words, each with the same length (e.g., 6 lowercase letters). One of these words is the secret. You can repeatedly make...
Implement K-Means and Detect Divisible Subarrays
Solve both coding tasks. Part A: Implement K-Means Clustering Implement K-means clustering for a set of points. Given: - points: a list of n points, w...
Calculate Jaccard Similarity Score for Two String Lists
Scenario During pair programming, the interviewer asks you to compare two lists of merchant tags and quantify their similarity. Question Implement a P...
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 ...
Review Preprocessing Code and Tests
You are reviewing a small Python preprocessing codebase during an interview. You do not need to write code. Part A: Environment and execution A shell ...
Build a CSV Query Engine
Implement a small in-memory CSV query engine. You are given CSV text where the first line contains column headers and each remaining line contains one...
Implement Minesweeper and Word Search
Solve the following coding problems. Problem 1: Generate and Print a Minesweeper Board You are given integers rows, cols, and mineCount. Generate a ro...
Compute Top-K word frequencies under a path
Given a filesystem path that may contain nested subdirectories and files, compute the top K most frequent words across all files. Describe an in-memor...
Find First Local Minimum
Given an integer array nums, find the index of the first local minimum. A local minimum is an element that is smaller than its immediate neighbors: - ...
Determine Whether Queries Can Zero Array
You are given an integer array nums of length n and a list of range queries queries, where each query is of the form [l, r, val]. For a query [l, r, v...
Solve Tree Views, Columns, and Calculator
The interview note referenced three separate coding tasks. Solve each task independently. Task 1: Binary tree side views Given the root of a binary tr...
Return valid task order from prerequisites
You are given N tasks labeled 0..N-1 and a list of directed dependency pairs [(a,b), ...] meaning task a must be done before task b. 1) Return one val...
Solve Prime Jumps and Pipeline Scaling
An online assessment contains two independent coding problems. Solve both. Problem 1: Prime-Constrained Score Jump You are given an integer array scor...
Compare Complete or Partial Hands
Implement a hand comparison engine for a simplified poker-like card game. Each player has a hand represented by an array of card strings. A card is en...