Software Engineer Coding & Algorithms Interview Questions
Practice 2,743 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 shortest substring with n unique letters
Problem You are given a string s consisting of lowercase English letters and an integer n (1 ≤ n ≤ 26). Find the length of the shortest contiguous sub...
Find K-th Largest and Longest Vacation
Solve the following two coding problems. 1. Find the k-th largest element Given an integer array nums and an integer k, return the element that wou...
Find k pairs with smallest sums
You are given two sorted integer arrays arr1 and arr2 (each sorted in non-decreasing order), and an integer k. Consider all possible pairs formed by t...
Find right-side view of binary tree
You are given the root of a binary tree. From the right side of the tree, at each depth you can see exactly one node: the rightmost node at that depth...
Implement nested object path lookup
This question evaluates parsing and traversal of nested maps and arrays, robust error handling for missing keys and out-of-bounds indices, and reasoni...
Implement delimiter-free string codec
Design an encoder/decoder for a list of strings. - Implement two functions: - encode(strings: List[str]) -> str - decode(blob: str) -> List[str] -...
Merge multiple sorted arrays using min-heap
Problem You are given k sorted arrays of integers: - arrays[0], arrays[1], ..., arrays[k-1] - Each arrays[i] is sorted in non-decreasing order. - The ...
Reverse linked list in fixed-size groups
Problem You are given the head of a singly linked list and an integer k (k >= 1). Reverse the nodes of the list in-place in groups of size k: - The no...
Find shortest unique substring per word
This question evaluates string-processing and algorithmic problem-solving skills, focusing on identifying substrings unique to each word while handlin...
Detect Winners in Nested Tic-Tac-Toe
This question evaluates board-evaluation and pattern-detection skills, modular decomposition for reusable logic, and the ability to reason about time ...
Find shortest subarray with range ≥ k
Problem You are given an integer array nums of length n and an integer k. Define the range of a subarray as: \[ \max(\text{subarray}) - \min(\text{sub...
Find all unique triplets summing to zero
Problem Given an integer array nums, return all unique triplets [nums[i], nums[j], nums[k]] such that: - i, j, and k are distinct indices (i != j != k...
Implement Minesweeper click-to-reveal expansion
This question evaluates a candidate's ability to implement grid-based data structures, state management, and flood-fill style expansion logic for Mine...
Solve common array/string/linked-list tasks
You may be asked one or more of the following independent coding tasks. For each task, implement an efficient algorithm and clearly state time/space c...
Validate parentheses with one or three bracket types
Problem Given a string s consisting only of bracket characters, determine whether it is valid. A string is valid if: - Every opening bracket has a cor...
Minimize time using elevator then climb stairs
This question evaluates a candidate's ability to model and optimize a discrete decision under resource constraints, testing algorithmic optimization, ...
Find all cells reachable by downhill flow
Problem You are given an m x n grid heights, where heights[r][c] is the elevation of cell (r, c). A drop of water is placed at a starting cell start =...
Implement hierarchical folder access check
You are asked to simulate a simple hierarchical file system and implement an access-check function. The file system consists of folders arranged in a ...
Aggregate expenses by person, trip, and category
Problem You are given a list of expense records. Each record has: - employee_id (string) - trip_id (string) - category (string, e.g., MEAL, HOTEL, TRA...
Find numbers with exactly two sum-of-squares forms
This question evaluates understanding of integer representations as sums of two squares and the ability to reason about counting distinct unordered re...