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."
Contrast processes and threads
What are the differences between processes and threads? Compare memory isolation, resource ownership, scheduling, context-switch cost, inter-process c...
Find shortest substring with N unique characters
You are given a string s and an integer n. Find the shortest contiguous substring of s that contains exactly n distinct characters. If there is no suc...
Compute iterative sliding-window sum reduction
Problem Given an integer array nums and an integer window size k, repeatedly apply the following reduction: - If len(nums) > k: replace nums with a ne...
Implement a lazy inorder traversal iterator
Design an iterator over a binary tree that returns nodes in inorder sequence (left → root → right) using lazy traversal (i.e., you may not precompute/...
Implement a search autocomplete suggestion service
Design an autocomplete component that suggests the most relevant search phrases as a user types. You are given historical sentences with their usage c...
Find minimum threshold enabling grid path
Problem You are given an m x n integer grid grid. You start at the top-left cell (0, 0) and want to reach the bottom-right cell (m-1, n-1). You may mo...
Extend cloud file system with copy and compression
In-Memory Cloud File System V2: Copy, Capacity Updates, Compress/Decompress Design an in-memory file system with per-user quotas and additional operat...
Detect stop tokens during streaming inference
Problem: Stop-token / stop-sequence detection in streaming generation During LLM inference you receive tokens incrementally (streaming). Implement log...
Implement an in-memory DB with TTL backup/restore
Problem Design an in-memory database that stores values in a nested structure: - key (string) → field (string) → value (string) - Each (key, field) en...
Produce valid student lineup from parent array
You are given a hierarchy of n students represented by a parent array par of length n. - Students are labeled 1..n. - par[i] is the parent (mentor/man...
Compute ETA between two map nodes
Problem You are given a semantic road map represented as a weighted graph. Each node is an intersection/waypoint, and each edge represents a drivable ...
Design iterator for sorted union
Problem: Union Iterator for Sorted Inputs You are given two input iterators it1 and it2. Each iterator returns integers in strictly increasing order (...
Solve array duplicates and two-type subarray
Coding questions Solve the following array problems. Problem 1: Check for duplicates Given an integer array nums, return true if any value appears at ...
Design an in-memory cloud file system
In-Memory Cloud File System (OOD) Design an in-memory cloud file system that supports files owned by users with storage quotas. Data model / rules - E...
Choose fastest transportation mode on city grid
You live in a city modeled as a 2D grid. Each cell is either: - A transportation mode 1..4 where: - 1 = Walk, 2 = Bike, 3 = Car, 4 = Train - S = sou...
Implement a web crawler using a provided API
Web Crawler (BFS) You are implementing a simple web crawler. Given - A starting URL startUrl. - A provided API: - List<String> getUrls(String url) w...
Count visible people to the right
Problem You are given an array heights of length n, where heights[i] is the height of the i-th person standing in a line from left to right. For each ...
Implement a Word Guessing Game
Implement a four-letter word guessing game. You are given: - A dictionary containing valid four-letter English words. - A target word selected from th...
Solve Three Algorithmic Tasks
You were asked three coding problems: 1. Count events inside a time window - You are given an initial collection of event timestamps in HH:MM:SS fo...
Group words that map to same phone digits
Problem On a classic phone keypad (T9), letters map to digits: - 2: ABC, 3: DEF, 4: GHI, 5: JKL, - 6: MNO, 7: PQRS, 8: TUV, 9: WXYZ Given a list of lo...