Coding & Algorithms Interview Questions
Practice 2,960 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."
Implement ASCII canvas and solve two data problems
Solve the following coding tasks. 1) ASCII Canvas / Printer Implement a small drawing engine for a fixed-size canvas of width = 10 and height = 6. - E...
Compute Maximum Area Under Adjacent Bars
You are given an array heights of n non-negative integers. Each value represents the height of a vertical bar of width 1, and the bars are placed next...
Optimize flight and cargo bookings for profit
OptiCargo: make the booking algorithm profitable You are given two streams/lists: - Flights you may attempt to book. Each flight has: - flight_id ...
Implement Cache Eviction And Seat Assignment
Solve the following two independent coding tasks. Task 1: Implement a least-recently-used cache Design a class LRUCache with the following methods: - ...
Implement common neural network layers in PyTorch
Implement the following neural-network building blocks from scratch in PyTorch (using only basic tensor ops such as matmul, sum, mean, var, exp, max, ...
Implement a sliding-window rate limiter
Implement an in-memory sliding-window rate limiter. You are given a stream of requests, each with a timestamp in milliseconds. Part 1: Per-user limit ...
Find and Merge Camera Alert Intervals
You are given surveillance camera readings as time-series data. Each reading is a pair (timestamp, value), sorted by timestamp. A camera is considered...
Implement a recency cache and min-coins DP
The algorithm round covered two coding problems: 1. Design a fixed-capacity in-memory key-value cache that evicts the least recently accessed item whe...
Find longest substring with at most k distinct
Given a string s and an integer k, return the length of the longest contiguous substring that contains at most k distinct characters. Provide an O(n) ...
Find fair split of a two-color necklace
Given a circular necklace represented by a string s over {'a','b'}, you may cut the necklace at most twice (yielding three contiguous pieces). Can you...
Select next Hangman letter
Given the current state of a Hangman game, implement a function that selects the next letter with the highest likelihood of appearing in the secret wo...
Implement string-based candlestick classifier
Implement a function that takes a single input string encoding N daily OHLC price records in the format "o1,h1,l1,c1;o2,h2,l2,c2;...;oN,hN,lN,cN" (sem...
Find Minimum Compatible Version
You are given a list of software versions sorted in ascending numeric order and an expensive predicate is_compatible(version). Return the minimum vers...
Simulate Turn-Based Monster Battles
Simulate a turn-based battle between two teams of monsters. Base problem: - Team A and Team B are ordered lists of monsters. - Each monster has at lea...
Compute minimal time to finish dependent tasks
Coding: Task Scheduling With Prerequisites (Parallel Allowed) You have n tasks labeled 1..n. Each task takes exactly 1 unit of time to complete. Some ...
Compute ways to climb n steps
Implement a function that returns the number of distinct ways to reach the top of a staircase with n steps if you can climb either 1 or 2 steps at a t...
Solve chat, grid paths, and car rentals
You are given three independent programming tasks. For each, describe and implement an efficient algorithm, and be prepared to analyze its time and sp...
Check whether a string is a palindrome
Problem Given a string s consisting only of lowercase English letters (a-z), determine whether s is a palindrome. A palindrome reads the same forward ...
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...
Determine Whether P's Position Is Unique
You are given an R x C rectangular grid and a set of named entities. Each entity must be placed in exactly one distinct cell. You are also given a col...