Software Engineer Coding & Algorithms Interview Questions
Practice 2,306 real Coding & Algorithms interview questions for Software Engineer roles. From companies including Meta, Amazon, Google, Uber, Microsoft.

"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."
Implement a versioned hash map with snapshot
VersionedHashMap (time-travel key-value store) Design and implement a data structure VersionedHashMap<K, V> backed by a hash map that supports retriev...
Find largest connected group of overlapping intervals
You are given n people, where person i works during an inclusive time interval [start_i, end_i]. Define a communication graph: - Each person is a node...
Find the First Unique Log
You are given a list of log entries in the order they were produced. Each log entry can be treated as a string. Return the first log entry that appear...
Traverse a path and print directory tree
Problem (Node.js) You are given an absolute or relative file-system path rootPath. Write a Node.js function/program that: 1. Validates that rootPath e...
Find minimum reversals to orient edges away from root
You are given a connected graph with n nodes labeled 0..n-1 and n-1 directed edges. If you ignore edge directions, the edges form a tree. Each directe...
Compute total active time per Twitter Space
You are given an event log of user activity in Twitter Spaces. Each record has: - operation: one of create, join, leave - space_id: identifier of the ...
Design a constrained cache and secure string validator
Part A — Constrained cache (LRU-like) Design an in-memory cache that supports the following operations: - get(key) -> value | null - put(key, value) -...
Return all files under a path
You are building a simple file crawler. Task Implement an API/function: - Input: a filesystem path rootPath - Output: a list/array of all file paths c...
Add Two Forward-Order Lists
Implement a function that adds two non-negative integers represented by singly linked lists. - Each node stores a single digit. - The digits are store...
Count Connected Components in an Undirected Graph
You are given n nodes labeled from 0 to n - 1 and a list of undirected edges. Each edge is represented as a pair [u, v], meaning there is an undirecte...
Solve remembered OA coding tasks
The online assessment reportedly had five coding questions, but only the following three were described clearly enough to reconstruct: 1. Find the top...

Implement a Dependency-Aware Task Scheduler
Implement a TaskManager class with two methods: - AddTasks(tasks): add one or more tasks into the system. - ConsumeTask(): return and remove the execu...
Design an Elevator System and Scheduler
Design an object-oriented elevator system. Define core classes and interfaces (elevator, controller, request, floor, buttons, sensors) and their inter...
Can a Car Meet a Truck?
A truck's position on a 2D grid is known at each second. You are given an array positions where positions[i] = [x_i, y_i] is the truck's location at t...
Build a simplified Wordle game in React
Problem: Implement a simplified Wordle in React Build a small Wordle-like game UI using React. Requirements - The game chooses a single answer word by...
Find minimum subarray length with k distinct integers
Given an integer array arr and an integer k, find the minimum length of a contiguous subarray that contains exactly k distinct integer values. Return ...
Implement Memory Allocation and In-Memory Records
Solve the following two implementation problems. Problem A: First-Fit Memory Allocator You are given a contiguous block of memory containing n units, ...
Retain Top K Elements
Given a list of integers nums and an integer k, return a new list formed from the original list after removing every element except the k largest elem...
Find largest group of two-digit numbers sharing digits
You are given an integer array A of length n (1 <= n <= 100). Each element is a two-digit number (e.g., from 10 to 99). Two numbers are considered con...
Count Blocked Rate-Limited Requests
You are given an in-memory request log for a web platform. Each log entry has: - timestamp: an ISO-8601 UTC timestamp - request_ip: the client IPv4 ad...