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."
Find intersection of two line segments
Problem Given two 2D line segments AB and CD, determine whether they intersect. Each segment is defined by its endpoints: - A(x1, y1), B(x2, y2) - C(x...
Build a next-word frequency predictor
You are given a sequence of tokens (words) representing a corpus, e.g.: tokens = [w0, w1, w2, ..., wK-1] You need to build a next-word predictor that ...
Format words into wrapped/justified lines
You are given a list of words (strings with no spaces) and an integer maxWidth. Implement text formatting in two variants: Variant A — Basic word wrap...
Find smallest permutation under constraints
Given a non-negative integer n, consider its decimal digits as a multiset (digits can repeat). 1) Return the smallest possible integer that can be for...
Compute dependency load factors in a DAG
System Dependency Load Factor You are given: - programs: a list of unique program names (strings) - prerequisites: a list of pairs [a, b] meaning prog...
Implement a debounce function
Problem: Implement debounce(fn, wait) Implement a debounce utility function. Behavior Given a function fn and a delay wait (milliseconds), debounce(fn...
Find shortest relationship path using BFS
Problem You are given a set of pairwise relationships between entities (people/services/etc.). Treat each relationship as an undirected edge in a grap...
Find max equal-frequency block count for each prefix
Given a string S of length n (e.g., uppercase letters), for every prefix P = S[0..i] (for i = 0..n-1), compute the maximum integer k such that: - The ...
Stream output until stop token appears
You are implementing a simplified streaming conversational AI output filter. Text arrives in chunks (strings) in order. There is a special stop token ...
Compute minimum servers for cyclic tasks
You are given a list of tasks running on servers. Each task is represented as a pair (start, duration): - start is the start time in minutes from the ...
Compute minimum number of rooms needed
Problem You are given a list of meetings, each with a start time and end time. A single room can host only one meeting at a time. Two meetings overlap...
Extend BFS maze solver with keys and arrows
Problem You are given a rectangular maze represented as a 2D grid of characters. Implement and iteratively fix/extend a solver that finds a shortest p...
Remove duplicates in-place from unsorted array
Problem You are given an array nums of unsorted integers. Write a method that removes duplicates in-place (i.e., without using any additional data str...
Count islands in a binary grid
Problem You are given an m x n grid of characters where each cell is either '1' (land) or '0' (water). An island is formed by connecting adjacent land...
Find max consecutive elements with sum below target
You are given: - An integer array nums of length n, sorted in non-decreasing order. - An integer index such that 0 ≤ index < n. - An integer target. S...
Count distinct palindromic subsequences
Given a string s consisting of lowercase English letters, compute how many distinct palindromic subsequence strings of lengths 2, 3, and 4 can be form...
Define and compare smart pointers
What is a smart pointer? How do smart pointers manage ownership and lifetimes compared with raw pointers? Describe common types (unique, shared, weak)...
Contrast processes and threads
What are the differences between processes and threads? Compare memory isolation, resource ownership, scheduling, context-switch cost, inter-process c...
Compute maximum sum in a tree without adjacency
Given a tree where each node has an integer value, select a subset of nodes to maximize the sum under the constraint that if you choose a node, you ca...
Validate a simplified numeric string
Implement isValidNumber (s) that returns true if and only if the ASCII string s represents a valid number under these simplified rules: - Optional lea...