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."
Reverse a singly linked list robustly
Reverse a Singly Linked List In-Place Context: You are given the head of a standard singly linked list (each node has value and next). Implement and e...
Find single element when others repeat k times
You are given a sorted array of integers nums in non-decreasing order, and an integer k ≥ 2. Every value in nums appears exactly k times in a row, exc...
Determine Straight Flush
Implement a function that determines whether a set of poker cards contains a straight flush. You are given a list of unique playing cards. Each card h...
Add two binary strings
You are given two binary strings a and b (each consisting only of characters '0' and '1'). Return their sum as a binary string. Input - a: string, len...
Implement solutions to several coding tasks
You are given several independent coding interview tasks. Solve each with the required time/space complexity. Problem 1: Find the minimum in a rotated...
Implement lazy array and KV store
You are asked two coding problems in the same interview round: 1. Implement a lazy array abstraction - Create a LazyArray<T> that wraps an input li...
Design robot path boundedness with repeats
You are given a 2D grid with a set of blocked cells (obstacles) and a robot starting at (0, 0) facing north. The robot executes a finite instruction s...
Design an in-memory database with TTL and backups
You are asked to implement a small in-memory “database” that evolves across 4 parts. In each part you may reuse your previous code and only add/extend...
Implement a Cache Snapshot Printer
Implement an LRU-style cache and a snapshot-printing feature. The cache stores key-value pairs and has a fixed capacity. It should support normal cach...
Solve three algorithmic OA tasks
Task 1 (Odd-frequency string): Given an integer N in [1..200000], write an algorithm that returns any length-N string of lowercase letters (a–z) such ...
Compute shortest path to collect all keys
You are given an m×n grid containing walls (#), open cells (.), a single start cell (@), up to six keys labeled 'a'–'f', and matching doors 'A'–'F' th...
Implement iterators and write tests in Java
In Java, write everything from scratch (no IDE scaffolding): 1) Define a generic Iterator<T> interface with hasNext() and next(). 2) Implement ArrayIt...
Design time-based key-value store
Design an in-memory key-value store that supports time-based lookups. Operations Implement a class (or module) with the following methods: 1. set(key,...
Maximize profit from one or many stock trades
You are given an integer array prices where prices[i] is the price of a stock on day i (0-indexed). Answer the following two subproblems: 1. Single tr...
Compute square root to 1 decimal
Problem Given a non-negative real number x, implement a function sqrt1dp(x) that returns \(\sqrt{x}\) rounded (or truncated—clarify with interviewer) ...
Find LCA in a tree and extend to a DAG
Part A — LCA variant in a rooted tree You are given a rooted tree with n nodes labeled 0..n-1. Input: - parent[i] for each node i (parent[root] = -1)....
Solve three coding problems
The interview note described the following coding questions: 1. Find the N-th license plate in lexicographic order - A license plate has exactly 6 ...
Solve string merge and grid path tasks
Question Given two equal-length strings s1 and s2, create a new string by iterating i = 0 … n-1, comparing s1[i] with s2[n-1-i]: append s1[i]; if the ...
Implement a match-3 board resolver
Question Implement a match-3 board resolver (the core loop of a "candy crush"-style game). You are given an m×n grid of cells. Each cell holds a value...
Format messages with paginated suffixes
You are given a message string s and an integer width w. Split s into multiple chunks, preserving character order, and append a suffix "i/n" to each c...