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."
Answer range queries for alternating parity subarrays
Problem You are given an integer array nums of length n and q queries. Each query is a pair [l, r] (0-indexed, inclusive). A subarray nums[l..r] is ca...
Predict output when iterating ordered keys
Assume you have a data structure global_var[a][time] that behaves like an ordered map: - Keys (time) are kept in sorted ascending order. - order(map, ...
Parse logs and count error codes
You are given application log lines. Each line is expected to follow this format: ` [LEVEL] timestamp, eventName, errorCode, text ` - LEVEL is a singl...
Implement Fibonacci generator, balanced BST, frozenset
You are coding in Python. Implement the following three tasks. Unless explicitly allowed, do not use Python built-in container types (list, dict, set,...
Find k customers with least revenue
Problem You are given a list of purchase events. Each event contains: - customer_id (string or int) - amount (integer, may be 0; assume non-negative u...
Compute time for virus to infect grid
You are given an m x n grid representing the state of individuals in a lab. - 0 = empty cell (no one) - 1 = healthy individual - 2 = infected individu...
Compute max profit from one stock trade
Given an integer array prices where prices[i] is the stock price on day i, compute the maximum profit you can achieve by choosing at most one day to b...
Transform sparse time-code stream to dense rows
Problem You are given: - A fixed set of M distinct codes (strings). The column order of the output matrix is the lexicographic order of these codes. -...
Implement Three Assessment Functions
An online assessment contains three independent programming tasks. Implement each function clearly and efficiently. 1. Compute coordinate bounds - ...
Solve Two Algorithm Challenges
Solve the following independent algorithm problems. Problem 1: Maximize three non-overlapping variable-length subarrays You are given an integer array...
Implement a versioned in-memory DB with CAS and history
In-Memory DB V2: TTL + Compare-And-Set/Delete + Historical Reads Implement an in-memory database keyed by (key, field) supporting TTL, conditional upd...
Find minimum cycle cost per node
Problem You are given a weighted directed graph with n nodes labeled 0..n-1 and m directed edges. Each edge is (u, v, w) meaning you can go from u to ...
Compute streaming sliding-window minimums
Problem You are given an integer array nums of length n and an integer window size k. You scan nums from left to right (streaming). At each index i, y...
Compute product of array except self
Problem Given an integer array nums of length n, return an array ans of length n where: - ans[i] = (nums[0] nums[1] ... nums[i-1] nums[i+1] ... ...
How to maximize rewards with exactly k tasks
You are assigning n independent tasks to two interns. - Each task must be done by exactly one intern. - If intern 1 does task i, you earn reward1[i] p...
Can two names match with ≤2 swaps?
You are given two restaurant names represented as strings s and t of equal length (same character set, case-sensitive). In one operation, you may swap...
Assign tennis bookings to minimum courts
Expanding Tennis Club (Interval Scheduling) You run a tennis club with an unlimited number of courts. Each booking has a start and finish time. `text ...
Remove Target Values from a Linked List
Given the head of a singly linked list and an integer target, remove every node whose value equals target and return the new head of the list. The tar...
Build an Account Transfer Ledger
Implement a transaction processor for a payment platform. You are given a list of transaction records. Each record contains: - id: unique transaction ...
Count segments and optimize 3-server assignment
There are two independent programming tasks. --- Problem 1: Transaction Segments You are given: - An integer n, the length of an array. - An integer k...