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."
Count all palindromic substrings
Given a string s, count how many substrings of s are palindromes. - A substring is a contiguous block of characters. - A palindrome reads the same for...
Output lexicographically largest DFS traversal
You are given a graph with n nodes labeled 1..n and m edges. Assume an undirected graph unless stated otherwise. You must output a node visitation seq...
Compute BST range sum
Given the root of a binary search tree and two integers low and high (inclusive), compute the sum of values of all nodes with low <= val <= high. Prov...
Implement delimiter-free string codec
Design an encoder/decoder for a list of strings. - Implement two functions: - encode(strings: List[str]) -> str - decode(blob: str) -> List[str] -...
Implement fast power and k-palindrome
The phone screen included two coding tasks: 1. Fast exponentiation Given a floating-point number x and a signed integer n, compute x raised to th...
Build a Fuzzy Keyword Index
Implement a class that preprocesses a document and supports repeated keyword lookups. Requirements: - The constructor receives a text string containin...
Can board states be transformed?
You are given two strings, start and target, of equal length representing a one-dimensional board. Each character is one of: - L: a piece that may mov...
Find Missing Ranges with Bounds
Given a sorted array of distinct integers nums and two integers lower and upper that define an inclusive interval [lower, upper], return all maximal r...
Implement JavaScript utility and API functions
You are given a small JavaScript coding exercise with a local dataset authors and access to the public Pokémon API. Assume authors is an array of obje...
Validate and restore IPv4 addresses
Design and implement the following IPv4 tasks. a) Validate dotted IPv4: Write a function isValidIPv4 (s) that returns true if s is a valid dotted-deci...
Count islands with eight-direction adjacency
You are given an m×n grid of characters '1' (land) and '0' (water). Count the number of islands, where cells are connected if they touch in any of the...
Design hierarchical path store with create/set/get/remove
Design a hierarchical key-value path store supporting four operations on UNIX-style absolute paths (e.g., "/a/b"). Implement: 1) create(path, value): ...
Find shortest distance between two islands
Problem You are given an R x C binary grid where: - 1 represents land - 0 represents water The grid contains exactly two 4-directionally connected isl...
Implement text formatter and sum subarray products
1) Text formatter (LC-inspired variant): Given an array of words and an integer maxWidth W >= 1, break the words into lines so that the total length o...
Solve and extend the Knapsack problem
You are given n items, each with an integer weight and value, and a knapsack capacity W. Implement 0/1 Knapsack to return the maximum total value and ...
Design a referral leaderboard with chain-based counts
Design and implement a function that generates a referral leaderboard for a platform, given two equal-length arrays rh_users and new_users representin...
Explain arrays and memory layout
What is an array? How is an array represented in memory (contiguous layout, element size and alignment, indexing arithmetic). Analyze time complexitie...
Compute Variance from a Python List
Given a Python list of numeric values, write a function to compute the variance without using external libraries such as NumPy or pandas. Clarify any ...
Design structure for bottom-K customers by revenue
You are building an in-memory data structure to track customers’ current revenue and answer “top K” queries, where top K means the K smallest revenues...
Maximize profitable pairs
You are given an array profits of n integers representing net profit per item and an integer threshold T. You may form disjoint pairs (i, j). What is ...