Coding & Algorithms Interview Questions
Practice 3,469 real Coding & Algorithms interview questions for 2026. Covers companies like Meta, Amazon, Google, Uber, and Microsoft. Real questions from actual interviews with detailed solutions — ideal for focused interview preparation. Coding & Algorithms interview questions are the single most common technical gate for software engineering roles and are used to evaluate problem framing, algorithm selection, complexity trade-offs, correctness, edge-case reasoning, and clear communication under time pressure. Expect this category to appear in early technical screens and repeatedly across onsite loops at companies that weight it heavily (notably Meta, Google, and Amazon). Interviews will test arrays and strings, trees and graphs, dynamic programming, hashing and two‑pointer techniques, and the candidate’s ability to test and optimize code in a shared editor. Prepare with timed mock interviews, practice in the same editor you’ll use live, and build a progressive schedule that moves from fundamentals to medium/hard problems; typical candidates invest several weeks to a few months of focused practice depending on seniority and target company.

"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."
Validate an IPv4 address string
Given a string s, determine whether it is a valid IPv4 address. A valid IPv4 address: - Has exactly 4 parts separated by dots (.): x1.x2.x3.x4 - Each ...
Design command executor with undo
This question evaluates understanding of the command pattern, state and history management, failure handling, and appropriate data structure use for i...
Build a Least-Recently-Used Store
Implement an in-memory key-value store with least-recently-used eviction. The store is initialized with a positive integer capacity and supports two o...
Compute Nearest Destination Distances
This question evaluates graph and grid traversal concepts, specifically multi-source shortest-path computation on a grid and handling special-cell con...
Count Trips From Vehicle Logs
You are given a text log of vehicle events on a road system. Each log record contains: - license_plate: a string identifying a vehicle - event_type: o...
Track Users From Flight History
You are given an unsorted list of flight records. Each record contains departure_airport, departure_time, arrival_airport, arrival_time, and user_id. ...
Explain list vs tuple in Python
This question evaluates understanding of Python sequence types, specifically differences in mutability, hashing ability, memory footprint, and iterati...
Find Shortest Queue with Few Calls
This question evaluates algorithm design and analysis skills, focusing on working with restricted data structure APIs and minimizing total operations ...
Generate unique permutations with duplicates
Given an array of integers that may contain duplicates, generate all unique permutations. Ensure no duplicate permutations are returned even if some v...
Implement queue-based rate limiter with multi-key limits
Implement a rate limiter with method allow(timestamp) that returns true if a request is allowed under a limit of K requests per rolling window W milli...
Count decodings of a numeric string
Given a string s of digits representing an encoded message where '1' maps to 'A', ..., '26' maps to 'Z', and '0' cannot appear alone (it must be part ...
Implement tree traversals, BFS, and subsets generation
1) Define a TreeNode class for a binary tree with an integer value and left/right pointers. Implement preorder, inorder, and postorder traversals: (a)...
Maintain real-time top-K products from events
Design a data structure/class that ingests a stream of product events and returns the current top‑K products at any time. Events include {timestamp, p...
Devise sequence-rule detection strategy
You are given an integer sequence with 2 ≤ n ≤ 50 terms, possibly following rules such as arithmetic/geometric progressions, alternating patterns, pol...
Implement robust debounce and throttle in JavaScript
Implement debounce(fn, wait, options) and throttle(fn, wait, options) in JavaScript. Support leading/trailing invocation toggles, maxWait for throttle...
Implement GPU credit ledger
You manage a GPU pool with per-tenant credits. Given a list/stream of events where each event adjusts a tenant’s credit balance by a signed integer (p...
Find mode or minimum with time-space tradeoffs
For an unsorted array of integers, implement two functions: ( 1) return the minimum value; ( 2) return the value that appears most frequently (the mod...
Design a contiguous segment allocator
Design an in-memory contiguous segment allocator over an array of n cells (indexed 0..n- 1), all initially free. Support two operations: 1) allocate(l...
Design a queue and analyze tradeoffs
Design a FIFO queue data structure that supports enqueue, dequeue, peek, and isEmpty. Compare implementations using a singly linked list, a dynamic ar...
Clone list with random pointers
Question You are given the head of a singly linked list where each node has two pointers: next and random. The random pointer may be null or point to ...