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 Special Subarrays by Modular Frequency
You are given an integer array nums, and two integers modulo and target, where 0 <= target < modulo. Call an index i special if nums[i] % modulo == ta...
Design Algorithm to Minimize Payments in Expense-Sharing App
Scenario Expense-sharing app needs to settle debts among friends after a trip. Question Given a list of transactions (payer, payee, amount), design an...
Implement DelayQueue with Idempotent Task Execution
Scenario Message broker offers DelayQueue where tasks execute at future timestamps, ensuring idempotency on duplicate IDs. Question Implement a delay ...
Determine Pin Connections Through Common Boards
Scenario Pinterest boards contain many pins; need to infer relationships between pins. Question Given the membership lists of all boards, write a func...
Track Customer Referral Revenue
Design a data structure to track customers and referral-based revenue. Implement the following operations: - int insertNewCustomer(double revenue) -...
Implement Cache and Key-Value Store
The interview report mentions coding tasks similar to the following: 1. Bounded cache Implement a cache with a fixed capacity. Support: - get(ke...
Find conflicting pair using black-box run()
Problem You are given a list tests of n distinct test cases (you can treat them as IDs or objects). You also have access to a black-box function: - ru...
Find K most frequent elements
Problem You are given an array of integers nums and an integer k. Return the k elements that occur most frequently in nums. You may return the answer ...
Implement Three Research Coding Tasks
Solve the following coding problems. 1. Implement a differentiable matrix product You are given a list of k square matrices M1, M2, ..., Mk, all of sh...
Find dictionary words matching a phone digit string
You are given: - A digit string digits consisting of characters '2'–'9'. - A list of lowercase words words (dictionary). Use the classic phone keypad ...
Design an IPv4 Address Iterator
Design a class that iterates through IPv4 addresses. An IPv4 address is a string in the form a.b.c.d, where each octet is an integer from 0 to 255. Im...
Compute infection spread time
You are given an m x n grid representing a population during an outbreak: - 0 = empty cell - 1 = healthy person - 2 = infected person Every minute, ea...
Identify all bad nodes with group tests
You have N nodes. Each node is either good or bad (unknown to you). You can call a function test(S) on a subset of nodes S: - test(S) = True iff all n...
Convert an IP range to minimal CIDRs
Problem Given a starting IPv4 address ip and a non-negative integer n, output the smallest possible list of CIDR blocks that exactly covers n consecut...
Implement a Tic-Tac-Toe game API
Problem Design and implement a Tic-Tac-Toe game class that supports playing moves on an n x n board. Requirements - Two players, represented by intege...
Solve Anagram Without Sorting
Given two strings s and t, return true if t is an anagram of s, and false otherwise. You may not sort either string. An anagram uses exactly the same ...
Solve common search/parse/graph frequency tasks
You are given several independent coding tasks. For each task, write a function that returns the required output. 1) Find insertion index in a sorted ...
Solve three interview coding problems
This interview report described three coding tasks: 1. Generate a run-length spoken sequence Start with s1 = "1". To build the next term, read th...
Find shortest subarray with ≥k distinct integers
Given an integer array nums of length n and an integer k, find the length of the shortest contiguous subarray that contains at least k distinct intege...
Implement a Lazy Array
Implement a lazily evaluated array abstraction. The object should wrap an underlying sequence and support chained transformations such as map and filt...