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."
Find shortest path in a Fibonacci-ordered tree
You are given a recursively-defined binary tree T(order) whose shape depends only on order (not on node values). Nodes are labeled 0..N-1 using preord...
Implement an LRU cache
Design and implement an in-memory cache that evicts entries using the Least Recently Used (LRU) policy. The cache should store key–value pairs and sup...
Print Org Chart by Level
You are given an organizational chart as a list of employee records: (employee_id, manager_id, employee_name), where manager_id is null for the CEO. A...
Minimize sum with halving operations
You are given an array of non-negative integers nums and an integer k. In one operation, choose any index i and replace nums[i] with ceil(nums[i] / 2)...
Find power-of-two subarrays within sum range
Given an integer array nums and an integer k, find all subarrays whose length is a power of two and whose sum lies in the inclusive range [k, 2k]. Ret...
Solve sampling and streaming tasks
Implement the following algorithmic tasks: 1. Weighted random selection: You are given an array of positive integer weights w, where w[i] is the relat...
Solve array merge, tree view, and maze tasks
Solve the following coding tasks. 1) Merge two sorted arrays in-place You are given two integer arrays A and B, each sorted in non-decreasing order. -...
Find minimal time for four people crossing
Assume there are four people who need to cross a narrow bridge at night using a single flashlight. - Each person \(i\) requires a different, known amo...

Compute party time blocks per neighborhood
You are given two datasets: 1. Parties: - party_id (string or integer) - start_timestamp (e.g., UNIX timestamp or datetime) - end_timestamp (...
Implement a rate-limited hit counter
You are designing a hit counter that records the number of hits received in the past 5 minutes. Implement a class HitCounter with the following method...
Merge overlapping intervals
You are given a list of closed intervals on the number line, where each interval is represented as a pair of integers [start, end] with start <= end. ...
Check if CIDR is fully canceled by rules
You are given: - A target CIDR block T as a string, e.g. "10.0.0.0/16". - A list of rule CIDR blocks. Each rule has: - A type: either "allow" or "de...
Find first CIDR block covering IP
You are given: - A single IPv4 address as a string, e.g. "192.168.1.5". - A list of CIDR blocks (IPv4), each as a string in the form "a.b.c.d/x", wher...
Count unique Morse-code word transformations
Given an array of lowercase strings words. Each letter 'a' to 'z' has a corresponding Morse code string (standard 26-letter mapping). A word’s transfo...
Implement basic pagination for a list
You are given: - A zero-indexed array of items items (you can assume it fits in memory). - An integer pageSize > 0. Design and implement a pagination ...
Find minimum operations to make array sorted
Problem You are given an integer array a of length n. Define one operation as follows: 1. Remove the first element x = a[0]. 2. Append x to the end of...
Implement popup and redirect in JavaScript
You are working in a browser environment and must use vanilla JavaScript only (no external libraries). Task Implement a function showPopupAndRedirect(...
Design transactional in-memory key-value store
Problem Design and implement an in-memory key–value store that supports basic operations plus transactions. Core API Implement the following operation...
Solve Number of Islands
Question LeetCode 200. Number of Islands – Given a 2D grid of '1's (land) and '0's (water), count the number of islands. Follow-up: implement the solu...
Detect robot state after movements
Question Implement an algorithm to determine whether a robot following a given set of movement instructions ends in a valid recognized state (variant ...