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."
Match payments to invoices by memo or amount
Scenario You are building a small reconciliation tool that matches payments to invoices. Data structures Assume you are given: - invoices: a list of i...
Compute Driver Pay with Double-Pay Windows
You are building payroll logic for a delivery platform. Given a list of order records for one delivery driver, compute the total amount the driver sho...
Solve five hard algorithm problems
The coding rounds covered the following algorithmic problems: 1. Transform one array into another using range +1/-1 operations You are given two ...
Implement a Transformer Block with SwiGLU
Implement a Transformer-style neural network block in Python using either NumPy or PyTorch. Your implementation should include: 1. Multi-head self-att...
Find all unique triplets summing to zero
Problem Given an integer array nums, return all unique triplets [nums[i], nums[j], nums[k]] such that: - i, j, and k are distinct indices (i != j != k...
Implement Minesweeper click-to-reveal expansion
Problem Implement a playable text-based Minesweeper engine. You are given a board size and mine locations (or a mine count with a deterministic placem...
Compute win probability in coin-toss game
Two players, A and B, play the following game with a fair coin: - They toss the coin alternately: A tosses first, then B, then A, then B, and so on. -...
Generate Tower of Hanoi moves
You are given n disks of different sizes stacked on peg A (largest at bottom). You have two other pegs, B and C. You may move one disk at a time, and ...
Find kth missing integer and redundant operations
You are given two independent coding tasks. Task 1: K-th missing number You are given an integer array nums (not necessarily sorted) containing distin...
Validate parentheses with one or three bracket types
Problem Given a string s consisting only of bracket characters, determine whether it is valid. A string is valid if: - Every opening bracket has a cor...
Solve anagram grouping and in-place allocator
You are asked to solve two coding tasks. 1) Group anagrams Given an array of strings strs, group the strings that are anagrams of each other. - Two st...
Find closest value to a target in a BST
Problem Given the root of a binary search tree (BST) and a floating-point number target, return the value in the BST that is closest to target. If the...
Infection Spread Time on a Grid
Infection Spread Time on a Grid You are given an m x n grid where every cell holds one of three integer values: - 0 — an empty cell that can never be ...
Return all file paths via DFS
You are given an in-memory representation of a file system as a tree. Each node has: - name (string) - isFile (boolean) - children (list of nodes, emp...
Implement an LRU cache with O(1) ops
Design and code an LRU cache supporting get(key) and put(key, value) in O(1) average time with capacity N. Specify your data structures, handle update...
Build referral chains and detect cycles
You are given a directed referral graph where each user may have at most one referrer. Input file 'referrals.csv' has columns: user_id (INT), referred...
Identify trees, lists, and array search costs
Answer all parts concisely and justify time complexities. a) A data model requires each node to have at most two children and a single parent. Name th...
Classify relationships for multiple circle pairs
Given an array pairs of N circle pairs, where each circle is (x, y, r) with integer coordinates and r ≥ 0, classify each pair into one of: IDENTICAL (...
Implement KNN from scratch
Without using ML libraries, implement k-Nearest Neighbors for classification. Requirements: (a) Support Euclidean and cosine distances; (b) Allow tie-...
Detect sequence rule and repair anomaly
Implement next_value(seq: list[int]) that detects the rule of a numeric sequence and returns a tuple (model_name, parameters, anomaly_index_or_None, n...