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."
Determine If One Binary Tree Is a Substructure of Another
Given two binary trees A and B, determine whether B is a substructure of A. B is a substructure of A if there exists some node in A such that the subt...
Minimum Bills and Coins to Make Change
You are building the change-dispensing logic for a self-checkout cash register. Given a purchase change amount (in dollars, e.g. 6.35), compute the mi...
Minimum Drone Delivery Time on a Ring of Hubs
A fleet operator runs a single delivery drone over a set of m hubs arranged in a circle (a ring). The hubs are numbered 1 through m in clockwise order...
Implement Journey Counter and Speeder Detector
You are given a highway toll log parser with two classes: LogEntry and LogFile. Each log line has the format: timestamp license_plate location booth_t...
Implement Integer Square Root
Given a non-negative integer x, implement sqrt(x) and return the integer part of its square root, i.e., floor(sqrt(x)). Requirements: - Do not use a b...
Validate transactions with risk rules and reporting
You are building a small fraud-screening validator that reads transactions from a CSV file and outputs a human-readable report. Input 1) Transactions ...
Implement string formatting and request tracking tasks
You are given several small coding tasks. Implement each as described. Task A — Convert snake_case to camelCase Write a function that converts an iden...
Find Shortest Grid Path
You are given an m x n grid where 0 represents an open cell and 1 represents a blocked cell. You are also given a start cell (sr, sc) and a target cel...
Implement Employee Validation and Snake
This interview covered two coding tasks: 1. Employee validation - Implement a function that validates a collection of employees against a set of bu...
Implement a Sparse Matrix Class
Implement a SparseMatrix class for matrices that contain mostly zero values. Your class should support the following operations: 1. Construction and s...
Implement core puzzle/array/grid routines
You may be asked to solve one or more of the following coding exercises (write clean, testable code; discuss time/space complexity): 1) Jigsaw assembl...
Simulate Monster Team Battles
Design and implement a battle simulator. Data model: - Team: a team name and an ordered list of monsters. - Monster: a monster name, a type, current h...
Maximize Boxes Stored Through One Entrance
You are given two integer arrays: - boxes[i]: the height of the i-th box. - rooms[j]: the height limit of the j-th room in a linear warehouse. The war...
Implement a Byte Pair Encoding (BPE) Tokenizer
Implement a Byte Pair Encoding (BPE) Tokenizer Byte Pair Encoding (BPE) is a tokenization algorithm widely used to build the vocabularies of modern la...
Implement buffered file writer with concurrency support
You are given a simple file writer class that writes data directly to disk: `cpp class FileWriter { public: // Append data to the file on disk imm...
Traverse an Org Chart by Level
You are given an organization's reporting structure as a flat list of employee-manager relationships. Exactly one employee is the root (the CEO) and h...
Validate password and list rule violations
Problem You are given a password string p. Validate it against a set of rules and return all rules that the password violates. Rules 1. Length must be...
Validate a Parent-Child Forest
You are given a list of directed edges, where each edge is represented as (parent, child). The edges describe parent-child relationships among nodes i...
Find Common Prefix Across Strings
Given an array of strings, return the longest string prefix that is shared by every string in the array. A prefix must start at index 0 of each string...
Implement a Resizable Deque
Implement a double-ended queue (deque) data structure backed by a circular array. Your deque should support insertion and removal from both ends and s...