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."
Determine Balloon Popping Time
You are given a rectangular 2D grid representing a field of balloons. Each cell contains exactly one of the following values: - 0: empty cell - 1: inf...
Maximize coins with tokens moving by +3
You are given a 1D board represented by a string s of length n. Each character is one of: - '.' — an empty cell - 'C' — a cell containing exactly one ...
Compute nearest bathroom distance for each desk
You are given an m x n grid of characters containing only: - 'B' = bathroom - 'D' = desk - '_' = empty cell From any cell you may move one step up/dow...
Print the File System State
You are given a toy in-memory file system represented as an ordered sequence of disk blocks. Each block contains zero or more file records, such as fi...
Find Shortest Wiki Click Path
Implement a function that computes the minimum number of clicks needed to navigate from one wiki page to another. You are given two page URIs, start_u...
Implement spreadsheet cells with formulas
Design an in-memory spreadsheet that supports these operations on cells such as A1, B2, and ranges such as A1:B2: - Set(cell, value): assign an intege...
Merge Overlapping Collinear Segments
You are given a list of 2D geometric segments: vector<vector<pair<double, double>>> segments Each inner list represents one segment and contains at le...
Implement array merge, round-robin scheduler, and trading simulator
You are given three independent coding prompts. For each prompt, clearly define your function/class interfaces, handle edge cases, and analyze time/sp...
Compute rainwater accumulation on a height grid
Mountain Rainfall Accumulation You are given an m x n 2D integer grid elevation, where elevation[r][c] is the terrain height at cell (r, c). Assume 1 ...
Implement banking, knapsack, and pagination tasks
Problem A — Banking system command processor Implement an in-memory banking system that processes a sequence of commands in timestamp order. Entities ...
Find kth element and sliding-window kth in stream
You are given two related tasks. Task 1: Kth element in an array Given an integer array nums of length n and an integer k (1-indexed), return the k-th...
Build a hit/miss word guessing game
Two players play a word guessing game. - Player A chooses a secret word. - Player B repeatedly guesses single letters. - After each guess, the game re...
Implement Last-Click Attribution APIs
Design and implement an in-memory last-click attribution service. There are two event types: - click(timestamp, userId, campaignId) - conversion(times...
Find invalid transactions in time-sorted input
Problem You are given a list of transaction records, already sorted in non-decreasing order by time. Each transaction is a string in the form: "name,t...
Implement Calendar, Tokenizer, and Meeting Optimizer
Implement the following three coding tasks. 1. Calendar insertion check You are given a list of existing calendar events, where each event is a hal...
Implement Top-p (Nucleus) Sampling in NumPy
Implement top-p (nucleus) sampling for next-token selection in a language model, using only NumPy. Given a vector of raw logits over a vocabulary, top...
Schedule Non-Overlapping Meetings Efficiently
Implement a meeting scheduler that stores meetings as half-open intervals [start, end), where start and end are integer timestamps and start < end. Th...
Implement text editor with undo/redo
Implement a TextDocument class that supports applying edit operations, reading the current content, and full undo/redo, based on the following Python ...
Implement wildcard querySelector to extract URL
Problem: Extract a hidden URL from a deeply nested DOM A webpage hides a URL by splitting it into individual characters stored in DOM elements. The DO...
Write SQL using joins and window functions
SQL Coding: Rank within Groups with Joins You are given two tables: accounts - account_id (string) - customer_id (string) - segment (string) — e.g., "...