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."
Design error detection and propagation algorithms
You are given three related sub-problems about error detection and propagation. A) Log search: You have a chronologically ordered array of log lines. ...
Find normalized list difference efficiently
Given two lists of strings, list1 and list2, return all elements that appear in list1 but not in list2 after applying a consistent normalization step ...
Implement LRU, Extend to LFU, Analyze Complexity
Implement an in-memory Least Recently Used (LRU) cache with capacity N that supports get(key) -> value and put(key, value). Achieve O( 1) average time...
Find top co-purchased products
You receive purchase logs where each order is represented as an integer array of product IDs bought together in a single transaction. Implement a func...
Implement string dedup and mirror tree traversal
- String cleanup with group deletions (LeetCode-inspired): Given a string s consisting of lowercase letters, repeatedly delete any maximal contiguous ...
Detect intersection of two linked lists
Given two singly linked lists that may converge to share a common tail, determine whether they intersect and return the first node at which they join....
Design Manhattan-distance meeting point finder
Given an m×n grid with cells marked 1 for homes and 0 otherwise, choose a single meeting cell that minimizes the sum of Manhattan distances from all h...
Find earliest time password becomes irrecoverable
You are given a password string of length n and an attack order array attackOrder[1..n], a permutation of 1..n. At second i (1-indexed), the virus rep...
Implement write with internal buffer
Implement a buffered writer over an expensive sink API. You are given a function writeToDevice(byte[] chunk) that may accept at most M bytes per call ...
Design an O(1) eviction cache
Implement an in-memory key–value cache with fixed capacity that evicts the least recently used entry when full. Support get(key) -> value or -1 if mis...
Solve Grid and Counting Problems
A software engineering intern phone screen included two coding tasks: 1. Count islands in a grid Given an m x n grid of characters where '1' re...
Solve shortest and label-similar paths
Part A — Unweighted shortest path: You are given an undirected, unweighted graph with vertices labeled 0..n-1 and an edge list. Given start node s and...
Find duplicate files by size
Question LeetCode 609. Find Duplicate File in System — find duplicate files using file size instead of content comparison https://leetcode.com/problem...
Convert integer to NAF form
Question Convert a given integer into its Non-Adjacent Form (NAF) representation such that no two non-zero digits are adjacent, and prove that the res...
Minimize image processing cost with discount
Question You have n images. For the i-th image, processing costs filterCost[i] per day and must run from startDay[i] to endDay[i] inclusive. Each day ...
Count uniques in sparse sorted array
Question A sorted array contains many duplicates but only a very small number of distinct values. Design an algorithm that counts how many unique numb...
Solve programming task with follow-ups
Question Pure programming problem solving: implement the core algorithmic solution, then extend it to ( 1) support a constraint of consecutive N eleme...
Solve tree leaf sum and target indices search
Question LeetCode 129. Sum Root to Leaf Numbers LeetCode 2089. Find Target Indices After Sorting Array (array already sorted; require O(log n) time) h...
Find names similar by one swap
Question LeetCode 859. Buddy Strings – Given a target string and a list of strings, return all list entries that can match the target by swapping at m...
Compute sliding window sums by tag
Question Given a list of datapoints where each datapoint has tags, a timestamp, and a value, write a function that, for a specified tag t and window s...