Software Engineer Coding & Algorithms Interview Questions
Practice 2,712 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 Constant-Time LRU Cache
Implement a Constant-Time LRU Cache Implement a fixed-capacity least-recently-used cache. The captured source identifies an LRU cache coding problem b...
Find the Longest Consecutive Path in a Binary Tree
Given a binary tree, return the length of the longest downward path where each child value is exactly one greater than its parent value. Nodes have va...
Return the Most Frequent Values in an Array
Given a non-empty integer array, return the k values that appear most frequently. Ties are broken by smaller value first. Implement: `python def top_k...
Solve common string/DP/stack problems
This set of four coding tasks evaluates proficiency in string algorithms, dynamic programming, sliding-window techniques, monotonic stack usage, and t...
Compute org height and minimal CEO promotions
You are given an organization chart with n employees labeled 1..n. Employee 1 is the CEO (root). The reporting relationships are given as two integer ...
Compute decayed power levels in a graph
This question evaluates knowledge of graph algorithms and distance-based propagation, testing concepts such as shortest-path distance computation, mul...
Choose root to minimize edge reversals
This question evaluates understanding of directed versus undirected graph representations, tree rooting, and optimization of edge orientations, testin...
Count Good Numbers up to a Limit
Count Good Numbers up to a Limit A positive integer is good when all of the following hold: 1. Its decimal representation contains no digit 0. 2. No d...
Solve friend recommendations and time-versioned maps
This question evaluates the candidate's ability to design and implement specialized data structures for graph-based friend recommendation logic and ti...
Build a FastAPI summarization service
Implement a minimal but production-ready FastAPI service for text summarization. Requirements: - Expose an endpoint POST /summarize. - The request bod...
Design paint editor with undo/redo
Implement a simplified Paint editor that supports drawing on a 2D canvas and reverting changes using undo and redo operations. Canvas You are given a ...
Count distinct island shapes in a grid
This question evaluates understanding of grid-based connectivity and shape equivalence, exercising skills in graph traversal, spatial normalization, a...
Solve Maze and Suffix Problems
Solve the following two coding problems. Problem A: Find the shortest path through a maze with keys and doors You are given a 2D grid representing a m...
Compute Exclusive Execution Times
This question evaluates understanding of nested function execution and precise exclusive-time accounting derived from chronological logs, emphasizing ...
Match people to questions using tags and priorities
This question evaluates competencies in bipartite matching and combinatorial optimization, along with practical data-structure design for scalable tag...
Design an in-memory banking service
Design an in-memory banking service supporting timestamped operations and edge-case semantics. Implement: ( 1) create_account(id, t): Create a new acc...
Implement Composable Range Iterators
Implement an iterator library: range(start, end, step= 1) supporting forward/backward iteration, inclusive/exclusive endpoints, negative steps, and ov...
Implement image carousel with comments and upvotes
Implement an image carousel that supports: 1) cycling forward/backward and autoplay with a configurable interval; 2) a per-image comment thread with c...
Answer static and streaming Top-K queries
Top-K in static and streaming settings (3 variants) You are given integers and asked to answer Top-K queries under three different scenarios. Variant ...
Vertical Order Traversal of a Binary Tree
Vertical Order Traversal of a Binary Tree You are given the root of a binary tree. Return the vertical order traversal of its nodes' values — that is,...