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."
Find robots matching obstacle-distance signature
You are given a 2D grid and a distance signature dist = [left, top, bottom, right]. Grid Each cell is one of: - O : a robot - E : empty - X : obstacle...
Design Hierarchical Permission Checks
You are given a hierarchy of groups represented as a tree, for example World -> Country -> City. Each advertiser can be granted access at any group no...
Implement Caches, Undo, and Traversal
Solve the following coding tasks. For each task, define clean APIs, implement the core logic, and be prepared to explain time and space complexity. Ta...
Implement Expiring LRU Cache
Implement an in-memory key-value cache with least-recently-used eviction and per-entry expiration. The cache has a fixed positive capacity. Each inser...
Build the Largest Available Sequence
You are given an integer array values, a binary string state of the same length, and an integer m such that 0 <= m <= values.length. Build a sequence ...
Implement Memory-Efficient Document Undo/Redo
You are implementing a simplified document layer for a design tool. The document is a map from string key to string value. Implement a data structure ...
Merge two sorted lists
Given two sorted lists (arrays) of integers A and B in non-decreasing order, merge them into a single sorted list. Requirements - Output must be sorte...
Implement streaming enrichment aggregator
You are building a real-time document enrichment aggregator for a Kafka-like event stream. Each incoming event has the following fields: - document_id...
Implement Matrix Move and Logger
Implement the following two coding tasks. 1. Move a submatrix in place. You are given an m x n matrix, a source rectangle defined by its top-left corn...
Validate bracket sequence
Given a string s containing only the characters (, ), [, ], {, and }, determine whether the brackets are properly matched. A string is valid if: - Eve...
Encode and Rebuild a Binary Tree
Design two functions for a binary tree: - encode(root) -> string - decode(data) -> root Each tree node contains an integer value and has up to two chi...
Implement Social Graph Snapshot Queries
You are given a read-only snapshot of a social network. The snapshot is represented as a directed graph where an edge (u, v) means user u follows user...
Implement Food Delivery Billing
You are implementing billing logic for a food-delivery platform. Each completed delivery record contains: - order_id - driver_id - requested_at — when...
Implement four data-structure/string geometry tasks
Problem A — Multiply two non-negative integer strings You are given two strings num1 and num2 representing non-negative integers in base-10. - Return ...
Answer two coding questions (SQL and DP)
Solve the following two coding tasks. Problem A (SQL) You are given a table: Employee(id INT, salary INT) Write a query that returns the second highes...
Design and implement a Python solution
Design and implement a solution in Python for a problem specified by the interviewer. Outline your approach and chosen data structures, justify key de...
Compute Minimum Production Days
Question You are given a list of product IDs products, where products[i] is the type of the product that must be produced at step i, and a non-negativ...
Find Top K Largest Numbers
Given an unsorted array of integers nums and an integer k, return the k largest numbers in the array. The solution should use a heap rather than sorti...
Find shortest path on infinite grid
You are given an infinite 2D grid with integer coordinates. From a cell (x, y) you may move in 4 directions (North/South/East/West) by 1 cell per move...
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...