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 an LRU cache
Problem Design and implement an LRU (Least Recently Used) cache that supports the following operations in average O(1) time: - get(key) -> value: Retu...
Find a secret word using match feedback
You are given a list of unique words, each with the same length (e.g., 6 lowercase letters). One of these words is the secret. You can repeatedly make...
Compute dasher pay from order events
Dasher naive pay (active-time with overlapping orders) You are given a list of events describing when a delivery driver ("Dasher") accepts and fulfill...
Compute minimum rooms for meeting schedule
Problem You are given a list of meetings, where each meeting is represented as a pair of integers [start, end] (with start < end) indicating the meeti...
Reverse last two characters with space
Problem Given a non-empty string s with length at least 2, output a new string consisting of the last two characters of s in reverse order, separated ...
Merge overlapping 2D line segments
You are given a list of 2D line segments. Each segment is represented as a list of 2D points [(x1,y1), (x2,y2), ...] that all lie on the same straight...
Replace Dashes With Nearest Letters
You are given an m x n grid containing only dash characters '-' and alphabetic letters. For every dash cell, replace it with the nearest letter in the...
Implement Refactoring Assessment Features
You are given an existing Java project for a general refactoring assessment. The project already contains model classes, comments, and unit tests, but...
Recommend top-K movies from similarity graph
Movie Recommendation: Top K You are building a simple movie recommendation feature. Input - A set of movies 0..(M-1). - An undirected similarity graph...
Assemble DNA payload strings from tagged fragments
You are given a list of DNA-like fragments. Each fragment is a tuple: - start_tag: string - end_tag: string - payload: string A valid DNA chain is for...
Sort trade executions into a canonical order
You are building a small component in a trading system that consumes trade execution records from an upstream feed. The records may arrive out of orde...
Return all root-to-leaf tree paths
Given the root of a binary tree, return all root-to-leaf paths. - A leaf is a node with no children. - A path should be represented as a string with n...
Assign Reviewers from Changed Files
Write a Java program that helps automatically assign a code reviewer after a pull request is opened. You are given: 1. A local Git repository path. 2....
Solve Array Merge and Parentheses Cleanup
You are asked to solve two coding problems. Problem 1: Merge Three Sorted Arrays Given three integer arrays, each sorted in nondecreasing order, merge...
Remove duplicates in-place from unsorted array
Problem You are given an array nums of unsorted integers. Write a method that removes duplicates in-place (i.e., without using any additional data str...
Solve 12 coding interview problems
Below are multiple independent coding problems. --- Problem 1: Reduce an integer to 0 with \(\pm 2^i\) You are given a positive integer \(n\). In one ...
Compute suffix sums over waypoints
Problem You are given a batch of 2D waypoint trajectories. - Input: points with shape [B, N, 2], where points[b][i] = (x, y) is the i-th waypoint for ...
Check if a word exists in a grid
Given an m×n grid of characters and a string word, determine whether the word can be formed by sequentially adjacent cells (adjacent means horizontall...
Process pod logs with global increments and pop-min
You are given an event log for a system of “pods.” Each event is a pair [status, value]: - status == 1: Add a new pod with initial load = value. - sta...
Implement in-memory data structures and booking API
Part A — Implement a simplified Redis-like in-memory store (Go) Implement an in-memory key-value store that supports string values and list-of-strings...