Coding & Algorithms Interview Questions
Practice 2,960 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."
Determine Exact Layover Booking
You are given a layover duration target_hours and a list of experience durations durations, such as [2.0, 3.6], where each number represents the numbe...
Implement a Hierarchical File System
Implement an in-memory hierarchical file system. Create a class FileSystem with the following methods: - FileSystem() initializes an empty file system...
Support Dynamic Range Sums
Implement a data structure over an integer array nums. Part 1: If the array never changes, support sumRange(left, right) that returns the sum of eleme...
Debug a PyTorch U-Net shape mismatch
You are given a PyTorch implementation of a U-Net-like segmentation model that should follow the original U-Net style with valid convolutions (no padd...
Build a Wordle-style game in React
Task Implement a simplified Wordle-style game as a small React app. No styling/CSS is required (plain HTML output is fine). Game rules (assume Wordle-...
Rank songs by pairwise user preferences
You are given preference rankings for n users over m songs. Each song is labeled from 0 to m - 1. For each user i (0-indexed), you are given an array ...
Solve two set and graph problems
Implement solutions for the following two data-structure / algorithm problems. --- Problem 1: Friend-purchase recommendations You are given three enti...
Determine order of alien alphabet
You are given a list of words sorted in lexicographic order according to an unknown ("alien") alphabet. Task Return one valid ordering of the unique c...
Find longest increasing contiguous subarray
Problem You are given an integer array nums (length n). Part 1 Find the length of the longest contiguous subarray that is strictly increasing (i.e., f...
Solve a 9x9 Sudoku puzzle
Given a partially filled 9×9 Sudoku board, fill the empty cells so that the completed board is valid. A valid Sudoku satisfies: - Each row contains di...
Design an autocomplete suggestions API
Problem: Autocomplete suggestions (Trie) You are building an autocomplete feature. Input - A dictionary of n unique words words[i] (lowercase a–z). - ...
Decode a password string into letters
A password is encoded as a string s using the following rules: - Numbers "1" to "9" map to letters a to i. - Numbers "10#" to "26#" (two digits follow...
Compute height after deletions; enumerate valid delete sets
Warm-up: You are given a rooted binary tree with unique node ids and a list of ids to delete. When a node is deleted, promote all of its children to b...
Decide target via subsequence plus/multiply expression
Question Given a sequence of positive 32-bit integers A and an integer target, determine whether there exists a subsequence of A (preserving order, us...
Maximize revenue from inventory sales
Problem A store has n different products. For each product i (0-indexed), you are given an integer quantity[i] representing how many units of that pro...
Apply Range Overwrite Queries
You are given an integer array nums of length n and a list of range-assignment queries. Each query is a tuple (left, right, value), where left and rig...
Solve Parser, Trading, Tree, And Deck Tasks
You will solve several independent programming tasks. For each task, implement clean, tested code and state the time and space complexity. 1. Validate...
Implement dasher active-time calculator
Implement a function that, given a dasherId, a local pay-period interval [startLocalDateTime, endLocalDateTime), and a list of order events of the for...
Count distinct island shapes in a grid
Problem You are given an m x n grid of integers where 1 represents land and 0 represents water. An island is a group of horizontally or vertically adj...
Find a secret word via match feedback
Word Guessing Game (Mastermind-style) You are given a list of unique candidate words wordlist. All words have the same length L and contain only lower...