Coding & Algorithms Interview Questions
Practice 3,469 real coding and algorithms interview questions reported from interviews at Meta, Amazon, Google, Uber and Microsoft. The mix follows what these loops actually ask: arrays and strings, hash maps, two pointers and sliding windows, binary search, linked lists, trees and graphs, BFS and DFS, recursion and backtracking, dynamic programming, heaps and priority queues, and the occasional design-a-data-structure round. Roughly four in five are rated medium, which is where most technical screens sit; 477 are hard and cluster in onsite loops. 3,033 of them open in a console where you can run your solution against the test cases in Python, Java, C++ or JavaScript. 2,712 come from Software Engineer interviews, with the rest from Machine Learning Engineer, Data Scientist and Data Engineer loops, and 404 were set as take-home projects rather than live sessions.

"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."
Compute dasher pay with peak-hour query
This question evaluates a candidate's ability to perform time-interval arithmetic, prorated pay aggregation, robust handling of missing or inconsisten...
Check whether an integer is a power of two
This question evaluates proficiency in bit-level reasoning and integer arithmetic, specifically understanding binary representations and the propertie...
Compute currency conversion via graph search
Given a list of currency pairs, e.g., [('USD','CAD'), ('CAD','EUR'), ...], and a parallel list of conversion ratios [1.1, 1.2, ...] where ratio r mean...
Implement tree column grouping and minimal parentheses fixes
Part A — Binary tree column grouping: Given the root of a binary tree, group node values by their vertical columns from leftmost to rightmost using x-...
Implement Union-Find for connectivity
Implement a Disjoint Set Union (Union-Find) data structure with path compression and union by rank. Support operations: make_set, find(x), union(x, y)...
Design set with O(1) random access
Design a data structure ("FancySet") that stores unique integers and supports the following operations, each in average O(1) time: - add(x): Insert va...
Validate a training courses catalog
This question evaluates understanding of directed graphs, cycle detection, dependency validation, and data consistency in the context of a training co...
Implement an in-memory order book API
This question evaluates understanding of in-memory data structures and API design for maintaining ordered collections with FIFO semantics, correctness...
Design a referral leaderboard with chain-based counts
Design and implement a function that generates a referral leaderboard for a platform, given two equal-length arrays rh_users and new_users representin...
Solve sliding window, graph top-k, and greedy tasks
You have three coding tasks. Task 1 — Sliding window on strings: Given a string s and an integer k, find one longest substring of s that contains at m...
Compute distinct sums from limited coins
You are given two integer arrays, denom[0..n-1] and count[0..n-1], where denom[i] > 0 is a coin denomination and count[i] >= 0 is the number of availa...
Solve Topological Sort and Anagram Indices
1) Given a directed graph (n vertices, m edges), return a topological ordering if one exists. If the graph contains a cycle, detect it and explain how...
Solve Stack Decoding and Fuel-Constrained Paths
You are given two independent coding tasks. Task 1: Decode a Repeated-Pattern String Given a valid encoded string, return its fully decoded form. The ...
Maximize disjoint k-sum pairs
You are given an integer array nums and an integer k. In one operation you may remove two indices i < j if nums[i] + nums[j] == k; each index can be u...
Implement a formatted shell script output
Implement a formatted shell script output Write a shell script named script.sh that is invoked as: ./script.sh <username> <path_of_file>. It must prin...
Compute island size in grid
Compute island size in grid Given an m x n binary matrix grid of 0s (water) and 1s (land), where an island is a group of 1s connected 4-directionally,...
Maximize profit with transaction fee
Maximize profit with transaction fee Given an array of daily stock prices and a fixed transaction fee charged on each sell, compute the maximum profit...
Implement in-memory KV store with serialization
Implement an in-memory key-value store in Python that supports setting and retrieving values and can serialize and deserialize the entire store. Defin...
Implement a GPU credit manager
Implement a GPU credit manager for a compute cluster. Each user has a nonnegative credit balance that can be increased (grantCredits(user, amount)), c...
Maintain streaming median and loosemedian
Maintain streaming median and loosemedian Design a data structure for an online stream of positive integers supporting insert (x). After each insertio...