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."
Place items into earliest fitting bins
You are given k items with sizes items[0..k-1] and n bins with initial capacities caps[0..n-1]. Process items in order; for each size x, place it into...
Implement power, reduce string, parse tree, debug maze
1) Implement fast exponentiation (pow) Implement a function pow(x, n) that returns \(x^n\). - Inputs: a floating-point base x and an integer exponent ...
Implement multiple coding round problems
Solve the following coding problems. 1) Bus schedule (next departure) Given: - A sorted list buses[] of bus departure times (minutes since 00:00). - A...
Implement distinct islands and sliding maxima
1) Given a binary grid where 1 represents land and 0 represents water, count how many distinct island shapes exist. Two islands are considered the sam...
Implement a Tic-Tac-Toe game class
Problem Implement a class that supports playing an n × n Tic-Tac-Toe game. Requirements Create a class TicTacToe(n) with: - move(row, col, player) -> ...
Validate a bracket string
Given a string s containing only the characters '(', ')', '{', '}', '[', and ']', determine whether the input string is valid. A string is valid if: 1...
Detect k events in a sliding window
Implement an algorithm that, for each user, determines whether there exists a set of at least k ACH credit events from distinct device_ids within any ...
Implement multiplication without using the multiplication operator
Implement int multiply(int a, int b) without using * or /. You may use +, −, bitwise operators, and shifts. Requirements: - Handle negatives, zero, an...
Implement sliding-window rate limiter with dual thresholds
Implement getRequestStatus(urls: List[str]) -> List[str]. The i-th entry in urls represents a single incoming request at timestamp t = i seconds (t st...
Optimize bread-factory pipeline for max profit
You can assemble a production line by choosing modules of three types: Mixers, Ovens, Packers. Each module i has (type, build_cost_i, throughput_i uni...
Implement streaming k-way merge with constraints
Implement a function merge_k(iterators, N) that returns the first N items of the global ascending order from k sorted, potentially unbounded iterators...
Review checkout code for defects and privacy
You are reviewing a supermarket checkout implementation. Identify and prioritize issues and fixes across: (a) monetary correctness (avoid floating poi...
Fix failing tests and refactor code
You're given a small Python repo. After creating and activating a clean virtual environment, installing requirements, and running "pytest -q", two tes...
Compute average unique pins per user
Task: Average Unique Pins Per User You are given a mapping from user IDs to their lists of pin IDs. Implement a function that computes the mean number...
Merge words by head-tail chaining
Given a list of lowercase words, merge them into a single string by repeatedly chaining words where the last character of the current string equals th...
Implement a Rollback Key-Value Store
Design and implement an in-memory key-value store that supports rollback. The store should support at least the following operations: - set(key, value...
Explain Java volatile semantics
What does the volatile keyword guarantee in Java's memory model? Describe visibility, ordering (happens-before), and restrictions on instruction reord...
Describe std::string copy semantics
In C++, what happens with std::string when you write: std::string a = "123"; std::string b = a; Describe which operations are invoked (copy constructi...
Sort products by price and attention score
You are given a list of strings, each formatted as "product,price,attention". Parse the list into records and return the product names sorted to prior...
Find smallest start index avoiding left exit
You are given an integer array jump of length n (0-indexed). If you are currently at index i, your next position becomes i + jump[i] (a positive value...