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."
Find kth smallest and count stair-climbing ways
You are given two separate algorithm questions. A) Find the k-th smallest element in an array (no sorting) Given an integer array nums of length n and...
Validate hiring request under role constraints
Problem You are building a simple HR assignment validator for a platform with companies, employees, and job roles. When the system receives a request ...
Find two numbers summing to target without hashmap
Problem Given an integer array nums (length n) and an integer target, return the indices (i, j) such that: - i != j - nums[i] + nums[j] == target You ...
Serialize and deserialize a binary tree
Problem Design two functions to serialize and deserialize a binary tree. - Serialize: convert a binary tree into a single string. - Deserialize: recon...
Compute minimax grid path and network delay
Problem (two related shortest-path tasks) Part 1 — Minimize the maximum value along a grid path ("minimax" path) You are given an m x n integer grid H...
Solve tiling, probability, and nested-radical puzzles
You are given several independent math/coding puzzles. 1) Domino tiling a 2×N board You have a 2×N rectangle and an unlimited number of 1×2 and 2×1 do...
Solve two-sum variants at scale
Base task: Given nums = [3, 1, 2, 2, 4] and target = 4, return the 0-based index pair (i, j) with i < j such that nums[i] + nums[j] = target. If multi...
Implement sqrt with Newton vs binary search
Implement numerically robust square-root routines and analyze convergence Task 1 — sqrt_newton(x, tol=1e-12) Implement a Python function that returns ...
Compute and Rank by Jaccard Similarity
Implement two functions: (1) jaccard_similarity(s1, s2) that tokenizes by splitting on any non-alphanumeric character, lowercases, treats tokens as se...
Design and secure a REST inference API
Design a REST API for Image Inference with Grad-CAM You are designing a public REST API for an image-inference service that accepts large images and r...
Compute optimal matrix-chain multiplication order
Matrix Chain Multiplication: Optimal Parenthesization and Analysis You are given five matrices to multiply: A1 (10×30), A2 (30×5), A3 (5×60), A4 (60×2...
Design an in-memory filesystem and circular queue
Part A — Design an in-memory hierarchical file system. Requirements: - Support operations: ls(path), mkdir(path), createFile(path, content), appendToF...
Compute max team size with a core interval
You are given n employees’ working-time intervals, where employee i works during the inclusive interval [startTime[i], endTime[i]]. You want to form a...
Implement LRU cache and copy random list
Coding questions (two parts) Part A — Deep copy a linked list with random pointers You are given the head of a singly linked list where each node has:...
Find the Smallest String After One Decrement
You are given a string s consisting only of lowercase English letters. You must perform exactly one operation: 1. Choose one non-empty contiguous subs...
Compute total after discounting most expensive item
Problem You are given: - An array prices of length n, where prices[i] is the price of the i-th item. - An integer discountPercent (0 to 100). A promot...
Implement an LRU Cache
Problem: LRU Cache (LeetCode 146) Design and implement a Least Recently Used (LRU) Cache that supports the following operations in average O(1) time. ...
Solve four algorithmic problems
Solve the following coding tasks. For each, describe your approach, complexity, and handle edge cases. 1) Make parentheses string valid with minimal d...
Answer k-step ancestor queries in a rooted tree
You are given a rooted tree encoded as a parent array par[1..n] where: - Nodes are labeled 1..n. - par[i] is the parent of node i. - Exactly one node ...
Debug Tensor Conversion Bugs
You are given a small tensor utility library used in distributed numerical code. The implementation has several bugs related to aliasing, array conver...