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."
Merge two sorted arrays in-place
This question evaluates array-manipulation and in-place algorithm skills, including understanding of sorted-data merging, index/pointer management, an...
Delete a Character From Cover
This question evaluates proficiency in string manipulation, interval arithmetic, and data-structure updates with attention to index mapping and edge-c...
Populate next pointers in a perfect binary tree
You are given a perfect binary tree (all leaves at the same level; every internal node has two children). Each node has fields left, right, and next. ...
Implement RLE and bit-packing compression
You are asked to implement two related compression/decompression schemes: Run-Length Encoding (RLE) and bit-packing. --- Part 1 — Run-Length Encoding ...
Compute the Nth Recency Value
Given an integer n >= 1, define a sequence a as follows: - a[0] = 0 - For each i >= 1: - If a[i - 1] has appeared earlier in the sequence, meaning t...
Can You Reach the Last Index?
This question evaluates a candidate's understanding of array traversal and reachability in sequences of jumps, along with the ability to reason about ...
Implement time-versioned KV store with restore
Design and implement an in-memory key–value store where every operation is associated with a timestamp (monotonically increasing integer). The store m...
Implement anagram check and odd-even linked list
You are given two independent coding tasks. Task 1: Check if two strings are anagrams Implement a function that determines whether two given strings a...
Find final URL by crawling until “congrats”
You are given a starting HTTP URL. Implement a function that repeatedly calls URLs returned by previous responses until you reach a response that indi...
Compute minimum semesters to finish courses
This question evaluates graph theory and scheduling competencies, including dependency resolution, cycle detection in directed graphs, and capacity-co...
Solve sliding-window, flattening, decode, and O(1) random set
This multi-part question evaluates competence in string processing and nested parsing, linked-list flattening and recursion depth management, dynamic ...
Find Each Cell's Nearest Source
Given an m x n grid containing 1 for source cells and 0 for regular cells, compute for every cell the shortest 4-directional distance to any source ce...
Implement a Capacity-Bounded Cache
This question evaluates a candidate's ability to design and implement an efficient capacity-bounded in-memory key-value cache, assessing understanding...
Solve palindrome and missing-number variants
You are asked to solve two coding problems and analyze the time and space complexity of each. 1. Palindrome check Given a string s, determine whe...
Implement a multi-button click detector
Implement a click detector for multiple physical buttons. You receive button state updates as a stream. Each update provides: - button_id (integer) - ...
Minimize batches and allocate riders by time
This question set evaluates algorithmic problem-solving in scheduling and resource allocation, assessing understanding of batching under capacity and ...
Implement popup and redirect in JavaScript
You are working in a browser environment and must use vanilla JavaScript only (no external libraries). Task Implement a function showPopupAndRedirect(...
Merge Nested Dictionaries Iteratively
Given a list of Python dictionaries, merge them into a single dictionary without using recursion. Rules: - Process the dictionaries from left to right...
Design a voting counter for restaurants
This question evaluates familiarity with hash-table–based counting, efficient update and lookup operations, handling of ties with a deterministic tie-...
Implement np.random.choice
This question evaluates understanding of random sampling algorithms, probability distributions (uniform and weighted), handling of weights and edge-ca...