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."
Maximize sum with no adjacent tree nodes
This question evaluates understanding of tree-based dynamic programming and stateful optimization for selecting non-adjacent nodes, testing algorithmi...
Find a split-stay booking across listings
This question evaluates understanding of interval coverage and algorithmic problem solving, specifically reasoning about continuous date ranges, split...
Count Numbers With Odd Zeros
Given an array a of non-negative integers, count how many elements contain an odd number of digit '0' in their decimal representation. Notes: - Treat ...
Design command executor with undo
This question evaluates understanding of the command pattern, state and history management, failure handling, and appropriate data structure use for i...
Find robots matching obstacle-distance signature
This question evaluates spatial reasoning on 2D grids, the ability to compute distance signatures to nearest obstacles, and careful handling of bounda...
Build a simplified Wordle game in React
This question evaluates a candidate's competency in React-based front-end development, covering component design, state management, asynchronous HTTP ...
Maximize score in 15-sum card game
This question evaluates algorithmic problem-solving in combinatorial search, state-space optimization, and memoization by asking for the maximum achie...
Solve and optimize menu combo DP
Given up to N different menu items, each with a unit price, and a list of combo offers where each offer specifies quantities for some items and a tota...
Design menu DP and optimize for three items
You are given a restaurant menu with n single items and m combo offers. Each single item i has a price p[i] (in cents). Each combo j specifies nonnega...
Solve word count, node, segmentation, stock tasks
You have four tasks: 1) Count words with explicit rules: Given a text document, return the number of words. First define precisely what qualifies as a...
Implement DFS for connected components
Given an undirected graph with n nodes (1 ≤ n ≤ 200, 000) and an edge list, implement depth-first search to compute (a) the number of connected compon...
Solve hierarchy distance and digit-square convergence
You have two independent tasks: A) Organization hierarchy distance Given a list of (employee, manager) pairs that form a complete hierarchy (a single ...
Implement file deduplication at scale
Write a program to deduplicate files in a very large directory tree. Identify groups of identical files without loading entire files into memory. Outl...
Group words into anagram lists
Given an array of strings, group the words into lists of anagrams and return the collection of groups in any order. For example, ["abc", "cab", "edf"]...
Maximize pay by flipping k rest days
Given integers BasePay and Bonus, a binary string schedule of length n where '1' means work and '0' means rest, and an integer k, you may change up to...
Implement and analyze number-pattern function
Implement a function print_number_lines(n) that prints n lines, where the i-th line contains the integers from 1 to i separated by spaces (e.g., n=3 p...
Find leftmost point of maximum brightness
You are given an array of lights, where each light is [p, r] representing a lamp centered at coordinate p on the real number line with radius r, illum...
Simulate fixed-shape tiling on a grid
You are given an empty n-by-m grid and a list of tile patterns, patterns[0..k-1]. Each pattern is a binary matrix (1 = filled cell, 0 = hole) and must...
Count palindrome substrings in a string
Given a lowercase ASCII string s, count the number of substrings that are palindromes and return the count. Implement an O(n^ 2) solution using expand...
Solve grid path and top‑k frequency
Part A — Grid Reachability with Obstacles: Given an m×n matrix of 0s and 1s where 0 indicates a passable cell and 1 indicates a blocked cell, starting...