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."
Solve interval merging and histogram area
The coding round included two algorithm problems: 1. Merge overlapping intervals: Given a list of closed intervals [[start1, end1], [start2, end2], .....
Compare common data structures and uses
Compare common data structures and select appropriate ones for specific tasks. For arrays, linked lists, stacks, queues, hash tables, binary search tr...
Design a duplicate-file removal algorithm
Your filesystem contains millions of photos. Duplicates are strictly byte-identical files (no ML/CV similarity). Design an algorithm to detect and del...
Compute probability last passenger gets own seat
There are 100 passengers boarding a plane with 100 seats, numbered 1 to 100. Passenger i (for 1 ≤ i ≤ 100) has a ticket for seat i. The boarding proce...
Compute immediate delivery percentage
Question LeetCode 1173. Immediate Food Delivery I – Write an SQL query to calculate the percentage of immediate (same-day) orders, rounded to two deci...
Solve bank, password, expression algorithm tasks
Question Implement a banking system that supports four specified operations within 90 minutes. Implement a password-related algorithm (e.g., validatin...
Design a 25,000-CSV ETL pipeline
You state that you built an ETL pipeline to preprocess 25,000 CSV files and load the results into a centralized database. Design the pipeline in a way...
Maximize score in 15-sum card game
Problem A deck has 36 cards: 4 suits × ranks 1 through 9 (so there are exactly four 1s, four 2s, …, four 9s). Suits do not affect scoring; only ranks ...
Implement sparse vector dot product and cosine similarity
Sparse Vector Class Implement a SparseVector class for high-dimensional vectors where most entries are zero. Representation Assume each vector has: - ...
Solve three algorithmic OA problems
This is an online assessment (Codility-style, 150 minutes) consisting of three independent coding problems. Solve each one separately; they do not sha...
Connect next pointers for each tree level
You are given the root of a binary tree where each node has fields left, right, and next (initially null). For every node, set its next pointer to the...
Compute Plant Infection Stabilization
You are given an m x n grid of plants. Cell types: - X: infected plant - .: healthy plant - I: immune plant (used only in some variants) Two cells are...
Track Users From Flight History
You are given an unsorted list of flight records. Each record contains departure_airport, departure_time, arrival_airport, arrival_time, and user_id. ...
Compute Roller Coaster Scores
You are given a list of roller coaster descriptions. Each description is a string in the format: <CoasterType> <MaxSpeed> <BumpsPerSecond> <LiftType> ...
Optimize password transform and discount scheduling
Part 1 — Transform to palindromic k-periodic string: Input: a lowercase string currentPassword and integer k. Constraints: 1 <= k < len(currentPasswor...
Maximize Minimum Scaled Value
You are given two integer arrays values and costs of the same length n, and a non-negative integer totalCost. For each index i, you may choose an inte...
Implement custom iterators and interfaces
Define a minimal Iterator interface (e.g., hasNext(), next()) for integers without using IDE-generated scaffolding. Implement two iterator classes in ...
Design an Animal Chess OOP simulation
Design and implement a simplified Animal Chess (Dou Shou Qi) game using object-oriented principles. Include: 1) Piece classes Elephant, Lion, Tiger, L...
Compare Spring and Spring Boot
What are the differences between Spring Framework and Spring Boot? Compare configuration approaches, auto-configuration, embedded servers, opinionated...
Count Similar Photo Groups
You are given n photos labeled 0 to n - 1 and an n x n binary matrix isSimilar. - isSimilar[i][j] = 1 means photo i and photo j are directly similar. ...