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."
Assign Pins to Shortest Columns
You are given a list of pins, where each pin has a height, and a fixed number of columns in a masonry-style layout. Process the pins in their original...
Solve three easy algorithm problems
You are given three independent algorithmic tasks. For each one, explain your approach (no need to run code). 1) Merge two sorted lists (integers inst...
Evaluate an arithmetic expression
Given a valid string expression containing non-negative integers, spaces, and the operators +, -, *, and /, return the computed result. Requirements: ...
Minimize travel cost with two cities
You are scheduling candidates to attend an onsite interview. Each candidate i can fly to New York for cost c1[i] or to San Francisco for cost c2[i]. C...
Return a valid task order
You are given n tasks labeled from 0 to n - 1 and a list of prerequisite pairs prerequisites, where each pair [a, b] means task b must be completed be...
Compute task order with prerequisites
Given an integer n representing tasks labeled 0..n-1 and a list of prerequisite pairs (a, b) meaning b must be completed before a, return any valid or...
Paginate forward and backward through results
You are asked to extend a basic pagination system to support forward and backward navigation, similar to a cursor-based API. You are given: - A zero-i...
Compute meeting rooms and evaluate RPN
You are given two independent coding tasks. Task 1: Minimum number of meeting rooms Given a list of meeting time intervals intervals, where each inter...
Design structure for first unique login user
You are given an online stream of user login events. Each event is a user ID (e.g., an integer or string) indicating that this user has just logged in...
Solve power jumps and graph tour
This online assessment contained two coding problems: 1. Minimum operations using signed powers of two Given an integer n, you want to make it equal...
Implement Connect Four game
Question Design and implement the Connect Four game board, player moves, and winner-detection logic. Discuss time/space complexity and possible follow...
Implement a balance tracker and interval merger
This screening contained two coding exercises. Part 1: Driver balance tracker You are building an in-memory ledger for a delivery platform. Each updat...
Compute task order and layered execution
You have N tasks labeled 0..N-1 and prerequisite pairs (a, b) meaning task a must complete before task b can start. Return any valid execution order o...
Filter hierarchical paths after deletions
Given two arrays: ( 1) paths — slash-delimited hierarchical strings such as "California", "California/San Francisco", "California/San Francisco/7th St...
Check balanced parentheses with multiple bracket types
Given a string containing only parentheses '()', determine whether it is balanced. Follow-up: extend the solution to also support '[]' and '{}' with c...
Implement single-tab browser history navigation
Implement a BrowserSession for a single-tab browser. APIs: - BrowserSession(string homepage): Initialize with homepage; current page starts at homepag...
Set second tree values by subtree sums
Given the roots of two complete binary trees T1 and T2 that have identical structure and the same number of nodes, replace each value in T2 with the s...
Find a Valid Course Order
You are given n courses labeled from 0 to n - 1 and a list of prerequisite pairs. Each pair [course, prerequisite] means prerequisite must be complete...
Maximize 1D deliveries within distance and minimize total distance
You are given positions on a 1D line: - people: an array of N integers (positions of people) - shops: an array of M integers (positions of milk-tea sh...
Compute subtree sums with tree DFS
You are given an undirected tree with n nodes labeled 1..n and n-1 edges. The tree is rooted at node 1. Each node i has an integer value val[i]. Retur...