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."
Design top-K frequency structure
Design an in-memory data structure that supports: add(x) to observe an item, inc(x) to increment its frequency, dec(x) to decrement (deleting when zer...
Apply bitwise tricks for performance
For an integer-heavy inner loop, propose bit-level optimizations that reduce branches and memory traffic: e.g., population count usage, fast modulo by...
Compute minimum resources for overlapping intervals
You are given n tasks as half-open time intervals [start, end) on a single day. Determine the minimum number of identical servers needed so that no tw...
Solve BST range average and merge intervals
1) Given a binary search tree and an inclusive range [L, R], compute both the sum and the average of all node values where L <= val <= R. Use the BST ...
Optimize C++ Performance with Provided Concurrency
Given a C++ codebase where threading components (threads, work queues, and synchronization primitives) are already provided, profile and optimize the ...
Implement and compare round-robin and consistent hashing
Implement a round-robin load balancer that selects among service nodes, skipping unavailable nodes and wrapping around correctly. Fix typical pitfalls...
Implement cheapest itinerary with date filters
Implement a function that computes the cheapest itinerary from a given origin to a destination using a list of flights, where each flight has (id, sou...
Simulate pouring water onto a 1D terrain
You are given a 1D terrain represented by an integer array heights, where heights[i] is the height of the column at index i. Part 1 — Render terrain W...
Compute sum of longest positive subarray
Compute sum of longest positive subarray Given an integer array that may contain positive and negative numbers, find the sum of the longest contiguous...
Solve two DS&A optimization problems
Problem 1 — Maximize alternating-sum over four array partitions: Given an integer array arr[1..n] (1-based). Choose indices a, b, c with 1 ≤ a ≤ b ≤ c...
Maximize funds with capital-gated projects
Maximize funds with capital-gated projects You start with initial funds W and may undertake at most K projects. Each project i has a required capital ...
Check if two-group seating is possible
Check if two-group seating is possible Given an undirected graph represented as an adjacency list where adj[i] lists the indices of guests who know gu...
Reconstruct a tree from two traversals
Reconstruct a tree from two traversals Given two arrays representing the preorder and inorder traversals of a binary tree with unique values, reconstr...
Validate word abbreviation and reconcile two abbreviations
Validate word abbreviation and reconcile two abbreviations Implement a function isValidAbbreviation(word: string, abbr: string) that returns true if a...
Decrypt a twice-encrypted message using known pairs
Three people pass notes A → B → C → A. Notes are encrypted using a character-substitution cipher (a one-to-one mapping per character). You are given t...
Compute Driver Pay with Double-Pay Windows
You are building payroll logic for a delivery platform. Given a list of order records for one delivery driver, compute the total amount the driver sho...
Find all unique triplets summing to zero
Problem Given an integer array nums, return all unique triplets [nums[i], nums[j], nums[k]] such that: - i, j, and k are distinct indices (i != j != k...
Implement Minesweeper click-to-reveal expansion
Problem Implement a playable text-based Minesweeper engine. You are given a board size and mine locations (or a mine count with a deterministic placem...
Generate Tower of Hanoi moves
You are given n disks of different sizes stacked on peg A (largest at bottom). You have two other pegs, B and C. You may move one disk at a time, and ...
Validate parentheses with one or three bracket types
Problem Given a string s consisting only of bracket characters, determine whether it is valid. A string is valid if: - Every opening bracket has a cor...