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."
How would you sort filenames with numeric segments?
You are given a list of filename strings (e.g., "file10.txt", "file2.txt", "10file.txt"). Implement a custom sort for these strings using a comparator...
Minimize sum with halving operations
Minimize sum with halving operations You are given an array of non-negative integers nums and an integer k. In one operation, choose any index i and r...
Find power-of-two subarrays within sum range
Find power-of-two subarrays within sum range Given an integer array nums and an integer k, find all subarrays whose length is a power of two and whose...
Implement a Leaky Bucket Rate Limiter
Implement a leaky bucket rate limiter. You are given a class template for a rate limiter that controls whether incoming requests should be accepted or...
Find minimal time for four people crossing
Assume there are four people who need to cross a narrow bridge at night using a single flashlight. - Each person \(i\) requires a different, known amo...

Compute party time blocks per neighborhood
You are given two datasets: 1. Parties: - party_id (string or integer) - start_timestamp (e.g., UNIX timestamp or datetime) - end_timestamp (...
Implement a rate-limited hit counter
You are designing a hit counter that records the number of hits received in the past 5 minutes. Implement a class HitCounter with the following method...
Merge overlapping intervals
You are given a list of closed intervals on the number line, where each interval is represented as a pair of integers [start, end] with start <= end. ...
Check if CIDR is fully canceled by rules
You are given: - A target CIDR block T as a string, e.g. "10.0.0.0/16". - A list of rule CIDR blocks. Each rule has: - A type: either "allow" or "de...
Find first CIDR block covering IP
You are given: - A single IPv4 address as a string, e.g. "192.168.1.5". - A list of CIDR blocks (IPv4), each as a string in the form "a.b.c.d/x", wher...
Implement basic pagination for a list
You are given: - A zero-indexed array of items items (you can assume it fits in memory). - An integer pageSize > 0. Design and implement a pagination ...
Count unique Morse-code word transformations
Given an array of lowercase strings words. Each letter 'a' to 'z' has a corresponding Morse code string (standard 26-letter mapping). A word’s transfo...
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(...
Design transactional in-memory key-value store
Problem Design and implement an in-memory key–value store that supports basic operations plus transactions. Core API Implement the following operation...
Solve binary-search knapsack & graph shortest path
Question Given a sorted list of items, design an efficient solution (using binary search) to achieve the target objective instead of a dynamic-program...
Construct tree from inorder & postorder
Question LeetCode 106. Construct Binary Tree from Inorder and Postorder Traversal – Given the inorder and postorder traversal arrays of a binary tree,...
Solve Number of Islands
Question LeetCode 200. Number of Islands – Given a 2D grid of '1's (land) and '0's (water), count the number of islands. Follow-up: implement the solu...
Select the best dasher for an order
You need to assign an order to a dasher. Input: - An order with a pickup location (x, y). - A list of dashers, each with: - id - current location ...
Parse Requests and Compute Balances
You are given an array of strings representing requests in a social payments application. Process the requests in order and return the final balance o...
Count invalid nodes in a BST
You are given the root of a binary tree. A valid Binary Search Tree (BST) must satisfy: for every node with value v, all values in its left subtree ar...