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."
Print a binary tree as aligned text
Implement a function that prints (or returns) an ASCII layout of a binary tree. Requirements: - Each node has a string value (assume it contains no sp...
Count User Journey Prefixes
You are given a list of user activity logs. Each log record has the form [user_id, timestamp, action]. Example input: `text logs = [ [100, 1, "A"], ...
Implement LRU and LFU caches
Implement two in-memory cache classes with fixed capacity: 1. Recent-use cache - get(key): return the value for key, or -1 if the key does not exis...
First Word Matching Each Prefix Query
You are given a list of words (the dictionary) and a list of queries, where each query is a string prefix. For each query, return the index (0-based, ...
Solve String Arrays and Row Deduplication
You are given the following independent coding tasks. For each task, write clean production-quality code, handle edge cases, and state the time and sp...
Insert parentheses to minimize expression value
You are given a string expression of the form A+B, where A and B are non-empty strings of digits (no digit is '0'). You must insert exactly one pair o...
Predict most likely next word from training data
You are given tokenized training data consisting of multiple sentences (each sentence is a list of words). Build a lightweight model/data structure th...
Solve four algorithmic coding tasks
You are given four independent coding tasks. They may be solved in any order, and partial test-case credit is awarded for each task. The tasks are rou...
Implement Safe Average Function
Write a Python function average(values) that returns the arithmetic mean of a list of numbers. Requirements: - If values is empty, return 0. - The inp...
Reconstruct DNA from tagged fragments
You are given a list of DNA fragments. Each fragment is represented by a Sequence object containing two endpoint labels and a DNA string payload. Your...
Solve interval, grid-fill, and heap tasks
You are asked to solve the following algorithmic problems. Problem 1: Concurrent users from online intervals You are given n inclusive time intervals ...
Find Unique Target-Sum Pairs
Given an integer array nums and an integer target, return all unique pairs of values whose sum equals target. Requirements: - Each returned pair shoul...
Determine Safe Bomb Defusal
You are given a finite state machine representing a bomb defusal process. - Each state is represented by a string. - initialState is the starting stat...
Solve SQL and PySpark Data Tasks
Complete the following two data engineering coding tasks. Part A: Detect repeated crypto-transfer patterns in PostgreSQL You are given a PostgreSQL ta...
Implement an in-memory database with TTL and backup
In-Memory Database (Levels 1–4: TTL and Backup/Restore) Implement an in-memory database that stores records identified by a string key. Each record co...
Compute servers needed for daily recurring jobs
You operate a cluster of identical servers that run recurring daily jobs. For a single day, you are given a list of job execution intervals. Each inte...
Calculate Transaction Fees
You are building a payment processor. Each transaction has an amount in cents, a payment type, and a payment status. The platform charges a percentage...
Implement Rate-Limited Wikipedia Crawler
Implement a rate-limited Wikipedia crawler. You may use an AI coding assistant during the interview, such as Cursor or Claude Code. You are expected t...
Design log queries and a buffered writer
Part A — Log store with time-range queries: Implement a data structure that ingests log entries with ISO-8601 timestamps (e.g., YYYY-MM-DD HH:MM:SS) a...
Find the Best Commute Mode
You are given a 2D grid representing a city commute map. The grid contains exactly one start cell S and exactly one destination cell D. Each other cel...