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."
Flatten Nested Comments
You are given a list of top-level posts, where each post may contain a list of nested comments, and each comment may itself contain more nested replie...
Find minimum swaps to sort array with duplicates
Problem Given an integer array nums of length n that may contain duplicate values, you may perform swaps where you choose any two indices i and j and ...
Sum numbers formed by root-to-leaf paths
You are given the root of a binary tree where each node contains a single digit from 0 to 9. Each root-to-leaf path represents a number obtained by co...
Generate all safe queen placements on board
You are given an integer n representing the size of a chessboard (n × n). You need to place n queens on the board so that no two queens attack each ot...
Count ways to decode digit string
You are given a string s consisting of digits '0' to '9'. The string encodes a message using the following mapping: - '1' → A, '2' → B, ..., '26' → Z....
Find shortest path in a grid with obstacles
You are given a 2D grid of size m x n representing a maze. Each cell in the grid is either empty (0) or blocked (1). You are also given two coordinate...
Highlight Exact Source Matches
You are given a string text and a list of strings sources. For every exact occurrence of any string in sources within text, wrap the matched character...
Implement ordering and undo executor
The interview included two coding tasks: 1. Dependency ordering: Given a set of tasks and their dependency relationships, return a valid execution ord...
Solve pair-counting and account-merging problems
Problem A — Count qualifying products You are given two integer arrays A and B, and an integer T. For each element a in A, count how many elements b i...
Maximize non-adjacent sum on an N-ary tree
You are given an N-ary tree (each node may have 0..k children). Each node contains an integer value (can be 0 or positive). You want to select a set o...
Remove duplicates in linked list
Question Given a linked list, remove all duplicate values so that each value appears only once. Provide solutions for both sorted and unsorted linked ...
Find median of two sorted arrays
You are given two sorted arrays of integers nums1 and nums2 in non-decreasing order. Let the lengths be m = nums1.length and n = nums2.length. Either ...
Implement monotonic-array linear interpolation
Question Implement a function interpolate(array_x, array_y, x) that returns the linearly interpolated y-value for a query x-value, given paired data p...
Decode Ambiguous Morse Messages
You are given a mapping from Morse patterns to lowercase English letters. Implement two related functions: 1. Deterministic decoding with character an...
Merge Nested Dictionaries Iteratively
Given a list of Python dictionaries, merge them into a single dictionary without using recursion. Rules: - Process the dictionaries from left to right...
Solve Three Coding Interview Problems
The interview included three coding tasks: 1. Common ancestor in an N-ary tree You are given the root of an N-ary tree and two target nodes. Dete...
Design a time-travel key-field store with TTL
Problem Implement an in-memory “database” that stores records by key and fields within each key. Each operation is given a timestamp (integer, non-dec...
Implement basic calculator with four operations
Implement a basic arithmetic expression evaluator. Problem You are given a string s representing a mathematical expression containing non-negative int...
Find largest subset sharing a common digit
You are given a list A of two-digit integers (each from 10 to 99). Two integers are said to “share a digit” if they have at least one digit in common ...
Implement a Leaky Bucket Limiter
Design and implement an in-memory leaky-bucket rate limiter. A limiter is configured with: - capacity: the maximum amount of queued load the bucket ca...