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 largest filename from ls -l output
You are given a multi-line string (via stdin) that represents the output of ls -l, with one entry per line. Each file line follows the typical ls -l f...
Implement Kubernetes Service Dependency Queries
You are given an in-memory inventory of Kubernetes-like services. Each service has the following fields: `text Service { id: string // ...
Implement an Alert Execution Engine
You are given an alert client API that provides alert configurations, metric query execution, and notification methods. Implement an alert execution e...
Maximize coins collected by tokens jumping +3
You are given a single-player board game represented by a string board of length N (1 ≤ N ≤ 100). Each character is one of: - '.': empty cell - 'T': a...
Implement stream random sampling in Python
You are given an unbounded stream of items that cannot be stored entirely in memory. Write Python code to maintain a uniform random sample from the st...
Solve sliding window and tree BFS
Question Solve a typical medium-level sliding-window problem (e.g., longest substring without repeating characters). LeetCode 102. Binary Tree Level O...
Implement portfolio optimization simulation
Question Given price-return time series in a DataFrame, simulate random portfolio weights, compute expected return, volatility, Sharpe ratio, and retu...
Count partitions and equal-cost packages
Question Given a string itemCategories, count the number of ways to partition it into exactly two contiguous non-empty substrings (a prefix and a suff...
Implement persistent key-value store
Question Design and implement an in-memory key-value store supporting set(key, value), get(key), shutdown() that flushes all data as bytes to a medium...
Solve Magic Dictionary and unknown traversal
Question LeetCode 676. Implement Magic Dictionary Determine and implement traversal/encoding that outputs nodes as 'cia' for the given skewed binary t...
Design Algorithm for Longest Increasing Subsequence Length
Scenario Programming assessment and infrastructure panel Question Design an algorithm to return the length of the Longest Increasing Subsequence of an...
Determine If Two Numbers Sum to Target
Scenario Live CodeShare Python/Java question during the same LendingClub interview assessing basic algorithmic fluency. Question Given an integer arra...
Find hotel pairs to cover a split stay
You are implementing a simplified “split stay” feature. Problem You are given: - n hotels (or listings), indexed 0..n-1. - For each hotel i, an unsort...
Solve load balancing and perfect pairs
1) Contiguous load balancing: You have n identical resources (servers) and m ordered tasks with processing times burstTime[0..m-1]. Each server must b...
Solve grid path and robot navigation
Part A — Shortest path in a grid with obstacles: Given an m×n grid of 0/1 cells (0 = open, 1 = obstacle), start at (0, 0) and end at (m−1,n− 1). You m...
Find minimal property set in neighborhood
You are given a list of properties, each Property(id: int, neighborhood: string, capacity: int). Given a targetNeighborhood (string) and groupSize (in...
Count subarrays summing to target
Given an integer array nums and an integer target T, return the number of contiguous subarrays whose sum equals T. Provide an algorithm that runs in l...
Find kth smallest pair sum with heaps
You are given two nondecreasing arrays A (length n) and B (length m) of non-negative integers and an integer k (1 <= k <= n*m). Return the k-th smalle...
Generate boolean truth table
Implement a function that, given a string boolean expression, outputs a complete truth table. The expression syntax is: variables are single uppercase...
Convert BST to sorted doubly list
Convert a binary search tree into a sorted doubly linked list in-place. Reuse the existing tree nodes: the left pointer becomes prev and the right poi...