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."
Minimize travel cost with two cities
You are scheduling candidates to attend an onsite interview. Each candidate i can fly to New York for cost c1[i] or to San Francisco for cost c2[i]. C...
Return a valid task order
You are given n tasks labeled from 0 to n - 1 and a list of prerequisite pairs prerequisites, where each pair [a, b] means task b must be completed be...
Paginate forward and backward through results
You are asked to extend a basic pagination system to support forward and backward navigation, similar to a cursor-based API. You are given: - A zero-i...
Compute task order with prerequisites
Given an integer n representing tasks labeled 0..n-1 and a list of prerequisite pairs (a, b) meaning b must be completed before a, return any valid or...
Solve power jumps and graph tour
This online assessment contained two coding problems: 1. Minimum operations using signed powers of two Given an integer n, you want to make it equal...
Compute meeting rooms and evaluate RPN
You are given two independent coding tasks. Task 1: Minimum number of meeting rooms Given a list of meeting time intervals intervals, where each inter...
Find longest substring with ≥k repeats
Problem You are given: - a string s (consisting of lowercase English letters), and - an integer k. Return the length of the longest contiguous substri...
Design structure for first unique login user
You are given an online stream of user login events. Each event is a user ID (e.g., an integer or string) indicating that this user has just logged in...
Find a Valid Course Order
You are given n courses labeled from 0 to n - 1 and a list of prerequisite pairs. Each pair [course, prerequisite] means prerequisite must be complete...
Implement a balance tracker and interval merger
This screening contained two coding exercises. Part 1: Driver balance tracker You are building an in-memory ledger for a delivery platform. Each updat...
Implement Connect Four game
Question Design and implement the Connect Four game board, player moves, and winner-detection logic. Discuss time/space complexity and possible follow...
Filter hierarchical paths after deletions
Given two arrays: ( 1) paths — slash-delimited hierarchical strings such as "California", "California/San Francisco", "California/San Francisco/7th St...
Check balanced parentheses with multiple bracket types
Given a string containing only parentheses '()', determine whether it is balanced. Follow-up: extend the solution to also support '[]' and '{}' with c...
Implement single-tab browser history navigation
Implement a BrowserSession for a single-tab browser. APIs: - BrowserSession(string homepage): Initialize with homepage; current page starts at homepag...
Compute task order and layered execution
You have N tasks labeled 0..N-1 and prerequisite pairs (a, b) meaning task a must complete before task b can start. Return any valid execution order o...
Set second tree values by subtree sums
Given the roots of two complete binary trees T1 and T2 that have identical structure and the same number of nodes, replace each value in T2 with the s...
Design a data structure to store anagrams
Problem You are building a small in-memory service that stores words and can return all stored words that are anagrams of a query. Design and implemen...
Debug and optimize a card-drawing strategy
You are given a simplified card game engine with unit tests. The game is played using a table of face-up cards; each card has an integer value. On eac...
Convert Samples into Event Intervals
You are given a time-ordered array samples, where samples[i] is the function name observed at integer timestamp i. Convert this trace into a list of e...
Compute subtree sums with tree DFS
You are given an undirected tree with n nodes labeled 1..n and n-1 edges. The tree is rooted at node 1. Each node i has an integer value val[i]. Retur...