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."
Implement a basic pivot table with totals
You are given a small in-memory table of data and are asked to implement a simplified pivot table operation and a printer for it. Assume the input dat...
Compute dasher pay from order event logs
You are given a list of delivery-order event records for a single dasher. Each record contains: - order_id - event_type in {CREATED, ACCEPTED, PICKED_...
Count substrings and generate TOC
Solve the following two coding problems. 1. Count valid binary substrings Given a string s consisting only of '0' and '1', count how many substrings s...
Solve tree diameter and grid path problems
You are interviewing for a software engineer / ML intern role and are given the following algorithmic problems. --- Question 1: Longest Path in a Tree...
Find missing ranges in interval
Given a sorted unique integer array nums and two integers lower and upper defining an inclusive interval [lower, upper], return all missing ranges not...
Design file deduplication across nested directories
Design and implement a file deduplication tool that, given a root directory, identifies groups of duplicate files. Requirements: traverse nested direc...
Solve common array/graph interview problems
You are given several independent coding tasks. Implement each function according to the specification below. 1) Rotate a square matrix in-place Input...
Check strings against dictionary efficiently
Given a large dictionary of unique words and a list of query strings, return for each query whether it exists in the dictionary. The dictionary may co...
Solve permutation successor and evaluate expressions
Part A: Given a sequence of integers that forms a permutation, rearrange it in-place to produce the immediate next sequence in lexicographic order. If...
Implement an unbiased array shuffle
Implement an unbiased array shuffle Implement an in-place function shuffle(arr) in JavaScript that returns a uniformly random permutation of the input...
Determine string transform via end-append moves
Given two strings s and t of equal length over lowercase English letters, in one move you may delete any character from s and append it to the end of ...
Find k closest values in a BST
Find k closest values in a BST Given a binary search tree with n nodes and a real target t, return k node values whose distances to t are smallest. Im...
Find Final Ball Holder
You are given an array receiver of length n, where friends are numbered from 1 to n. If friend i currently holds the ball, then after one second they ...
Find Maximum Envelope Nesting
You are given a list of envelopes, where each envelope is represented by [width, height]. One envelope can be placed inside another only if both its w...
Process time intervals and detect overlaps/gaps
You are given n time intervals representing debug log segments. Each interval has a start time, an end time, and an associated text message. - Each in...
Compute island size in grid
Compute island size in grid Given an m x n binary matrix grid of 0s (water) and 1s (land), where an island is a group of 1s connected 4-directionally,...
Compute distance of each node to a cycle
Problem You are given an undirected graph with n nodes labeled 0..n-1 and a list of edges. The graph is connected and contains exactly one simple cycl...
Maintain streaming median and loosemedian
Maintain streaming median and loosemedian Design a data structure for an online stream of positive integers supporting insert (x). After each insertio...
Solve swaps, graph paths, and movie DP
Solve swaps, graph paths, and movie DP Design and implement solutions for three tasks derived from a HackerRank-style assessment. 1) Minimum swaps to ...
Contrast TCP vs UDP; detect loss
Contrast TCP vs UDP; detect loss Contrast TCP and UDP in reliability, ordering, congestion control, connection setup, and overhead. How does TCP detec...