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."
Solve Parser, Trading, Tree, And Deck Tasks
You will solve several independent programming tasks. For each task, implement clean, tested code and state the time and space complexity. 1. Validate...
Find a secret word via match feedback
Word Guessing Game (Mastermind-style) You are given a list of unique candidate words wordlist. All words have the same length L and contain only lower...
Design a Versioned Key-Value Store
Implement a data structure for storing values by key over time. The structure should support these operations: - put(key, value, timestamp): Store the...
Implement two string utility functions
Implement the following Python functions: 1. number_of_character(string, char) - Return the number of times character char appears in string. - ...
Find duplicates in a list efficiently
Given a Python list that can contain integers (possibly negative) and may be very large, write code and explain approaches to find all values that app...
Answer range queries for alternating parity subarrays
Problem You are given an integer array nums of length n and q queries. Each query is a pair [l, r] (0-indexed, inclusive). A subarray nums[l..r] is ca...
Solve meeting-room scheduling and shortest paths
You are asked to solve two algorithmic problems. Part A: Meeting-room scheduling (intervals) You are given an array of meeting time intervals interval...
Predict output when iterating ordered keys
Assume you have a data structure global_var[a][time] that behaves like an ordered map: - Keys (time) are kept in sorted ascending order. - order(map, ...
Implement Fibonacci generator, balanced BST, frozenset
You are coding in Python. Implement the following three tasks. Unless explicitly allowed, do not use Python built-in container types (list, dict, set,...
Parse logs and count error codes
You are given application log lines. Each line is expected to follow this format: ` [LEVEL] timestamp, eventName, errorCode, text ` - LEVEL is a singl...
Find k customers with least revenue
Problem You are given a list of purchase events. Each event contains: - customer_id (string or int) - amount (integer, may be 0; assume non-negative u...
Compute time for virus to infect grid
You are given an m x n grid representing the state of individuals in a lab. - 0 = empty cell (no one) - 1 = healthy individual - 2 = infected individu...
Compute max profit from one stock trade
Given an integer array prices where prices[i] is the stock price on day i, compute the maximum profit you can achieve by choosing at most one day to b...
Compute shortest path between tree nodes
Question You are given the root of a binary tree (not necessarily a BST) whose nodes have integer values, and two target values u and v. Implement a f...
Implement tail N lines
Question Implement a utility tail(path: string, N: int) (and an equivalent stream variant) that prints the last N lines of input without loading the w...
Find maximum follow depth using recursion
You are given a directed follows relationship representing a social graph: - Each record (follower_id, followee_id) means follower_id follows followee...
Join Tables and Rank Users
You are given two analytics tables: - users(user_id, country, signup_date) - listening_events(event_id, user_id, played_at, minutes_played) Because th...
Solve Two Algorithm Challenges
Solve the following independent algorithm problems. Problem 1: Maximize three non-overlapping variable-length subarrays You are given an integer array...
Implement a Constant-Time Random Pool
Design a data structure RandomPool that stores unique integers and supports the following operations in average O(1) time: add(value), which inserts v...
Implement Three Assessment Functions
An online assessment contains three independent programming tasks. Implement each function clearly and efficiently. 1. Compute coordinate bounds - ...