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."
Implement idempotent request handling with idempotency keys
Problem You are implementing an API endpoint (e.g., POST /charge) that must be idempotent using an Idempotency-Key. Design and implement an in-memory ...
Count changed nodes between two menu trees
You maintain a merchant menu as a rooted tree. Each node represents a menu item/category and has: - key (string, unique among siblings) - value (integ...
Simulate pouring water onto terrain
Problem You are given an integer array heights representing a 1D terrain (each index is a column height), an integer V (units of water), and an index ...
Find the longest palindromic substring
Problem Given a string s, find the longest contiguous substring of s that is a palindrome (reads the same forward and backward). Input - A string s co...
Find right-side view of binary tree
You are given the root of a binary tree. From the right side of the tree, at each depth you can see exactly one node: the rightmost node at that depth...
Implement two-pointer unique-pair sum search
Given a nondecreasing integer array nums and an integer target, return all unique value pairs [a, b] with a <= b such that a + b == target. Use the tw...
Evaluate a Piecewise Linear Function
You are given an ordered list of 2D points [(x1, y1), (x2, y2), ..., (xn, yn)]. Connecting each consecutive pair of points forms a piecewise linear fu...
Implement logger and card ranking
This coding round contains two independent implementation tasks. Task A: Implement a configurable logger Implement a Logger component that accepts tex...
Place Non-Attacking Queens
Given an integer n, return all valid configurations for placing n queens on an n x n chessboard so that no two queens attack each other. A queen attac...
Solve BST and Grid Query Problems
Solve the following coding problems. Problem A: Find the kth largest value in a BST You are given the root of a binary search tree and an integer k. R...
Implement a Least-Recently-Used Cache
Design and implement an in-memory least-recently-used cache. Requirements: - The cache is initialized with a positive integer capacity. - Implement ge...
Implement a Flappy Bird Jump Agent
Implement a function should_jump(state) -> bool for a simplified Flappy Bird game. The bird has a fixed horizontal position bird_x and a vertical posi...
Optimize a SQL query plan tree
Problem You are given an in-memory representation of a SQL query plan as a tree of nodes (a relational algebra plan). Each node is one of: - Scan(tabl...
Compute minimum path sum in a triangle
Given a triangle of integers represented as a list of rows, find the minimum path sum from the top to the bottom. - From row r and index c, you may mo...
Compute distance-sum from every tree node
Problem You are given an undirected tree with n nodes labeled 0..n-1 and a list of n-1 edges. The tree is connected and contains no cycles. For each n...
Write SQL for car rental utilization by city
SQL / Data Query Prompt (Car Rental) You are given four tables: user - user_id location - location_id - city car - car_id - car_size (e.g., compact, m...
Answer static and streaming Top-K queries
Top-K in static and streaming settings (3 variants) You are given integers and asked to answer Top-K queries under three different scenarios. Variant ...
Solve palindrome and list tasks
You are asked to solve two coding problems. 1. Build the shortest palindrome by prepending characters: Given a string s, add characters only to the fr...
Compute triangle min path and dice stopping stats
You are given two independent interview questions. 1) Triangle minimum path sum (DP) Given a triangular array triangle with n rows, find the minimum p...
Solve four classic algorithm problems
You are given four independent coding tasks. For each task, implement the required function. --- Problem 1: Zigzag level-order traversal of a binary t...