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."
Implement run-length encoding and decoding
You are given a string consisting of lowercase English letters. You need to implement run-length encoding (RLE) and its corresponding decoding. 1. Enc...
Find Highest Product Segment
Given an integer array nums, find the maximum product obtainable from any non-empty contiguous segment. A contiguous segment must contain adjacent ele...
Return top-k subset sums in descending order
Problem You are given n distinct objects, each with a non-negative integer weight. A subset can be any selection of these objects (including the empty...
Count numbers with same popcount up to all-ones bound
Problem For any positive integer n, define f(n) as the smallest integer >= n whose binary representation consists only of 1 bits. Equivalently, if k i...
Build Friend Recommendations
You are given a social graph and a User class that stores a user id and the set of direct friends for each user. Complete a recommendation module with...
Return Top K Relevant Apps
You are given a mapping from application name to keyword relevance scores, for example: `json { "github": {"diff": 0.3, "code review": 0.8}, "jira...
Expand algebraic expression with distribution
Question Given an expression of lowercase letters, '+', '', and parentheses with no '+' outside any parentheses, return an equivalent expression conta...
Implement Card Validation and Recovery System
Question Design and implement a payment-card validation system supporting: Basic VISA validation (16-digit numbers starting with 4) using the Luhn che...
Identify Overlapping Sessions and Optimize Coverage
Scenario During the technical screen, candidates must implement interval algorithms used in fraud-detection pipelines to reconcile overlapping user ac...
Find largest digit-sharing subset
You are given an array of N integers. Each integer has exactly two decimal digits (i.e., each element is between 10 and 99 inclusive). You want to cho...
Parse API JSON and print org chart
You will solve two practical coding tasks. Task 1: Call an HTTP API and parse JSON You are given an HTTP endpoint that returns JSON describing transit...
Answer four array/time/grid query questions
You are given four independent coding questions. Q1) Best value-for-money item You are given two arrays of equal length prices and ratings (each ratin...
Add two integer strings using digit-adder
Coding Prompt You are given a helper function: - addDigits(a, b) -> (sumDigit, carry) - a and b are single decimal digits (characters '0'…'9' or int...
Calculate transaction fees from CSV records
You are given a CSV-like multi-line string representing transactions with columns: id,reference,amount,currency,date,merchant_id,buyer_country,transac...
Minimize travel time with optional meeting point
You are given a connected graph representing travel between locations. - Each node is a location. - Each edge has a non-negative travel time (if your ...
Apply commands to transform a matrix
You are given an integer matrix A of size n × m and a list of string commands to apply in order. Implement the commands and return the final matrix. C...
Design late-tolerant streaming window aggregator
You receive an unbounded stream of events: (event_time, user_id, category). Events may arrive up to 48 hours late and are not ordered by time. Design ...
Solve stock, BFS path, and merge intervals
Solve three coding problems; justify complexity and corner cases. A) Best Time to Buy/Sell Stock (one transaction): Given prices[0..n-1] (integers), r...
Solve subset-count and kth-factor problems
Two Independent Tasks A) Maximum Count Under Sum Constraint You are given an integer array arr and an integer budget n. Return the maximum number of e...
Implement streaming CTR with deduplication
Implement a Python function to compute streaming, per-campaign CTR over a sliding 24-hour window with click de-duplication and late-arriving events. R...