Software Engineer Coding & Algorithms Interview Questions
Practice 2,526 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."
Explain C++ vector, unordered_map, and virtual functions
Explain C++ vector, unordered_map, and virtual functions In C++, explain: - The amortized and worst-case time complexity of vector::push_back, and how...
Find shortest unique substring per word
Shortest unique substring for each word You are given an array of distinct strings words. For each word w in words, find a non-empty contiguous substr...
Evaluate a Boolean Formula AST
Evaluate a Boolean Formula AST Evaluate a formula represented as a JSON-compatible abstract syntax tree. A formula can contain Boolean literals, integ...
Evaluate a Formula AST with Variables
Evaluate a Formula AST with Variables Extend a Boolean-formula evaluator so the AST may contain variable references. Resolve each variable from a supp...
Find a Valid Course Order
You are given n courses labeled from 0 to n - 1 and a list of prerequisite pairs. Each pair [course, prerequisite] means prerequisite must be complete...
Solve classic coding interview problems
Solve the following algorithmic problems: 1. Egg testing with limited resources: You are given k identical eggs and a building with n floors. An egg b...
Implement CSAT tracking and call timing
You were asked to solve two coding problems. Problem 1: Implement a rolling CSAT tracker Implement a class CSATTracker for customer-satisfaction score...
Compute cart total with best promotion
Assume you are implementing a checkout price calculator for an online shopping cart. You are given: - A list of items in the cart. Each item has: - ...
Count Connected Land Regions
You are given an m x n 2D grid representing a map. Each cell is either land ('1') or water ('0'). A land region is formed by connecting adjacent land ...
Solve pair-counting and account-merging problems
Problem A — Count qualifying products You are given two integer arrays A and B, and an integer T. For each element a in A, count how many elements b i...
Find longest substring with ≥k repeats
Problem You are given: - a string s (consisting of lowercase English letters), and - an integer k. Return the length of the longest contiguous substri...
Count Islands After Land Additions
You are given an initially empty m x n grid filled with water. Land is added one cell at a time. Implement a function that receives: - m: number of ro...
Compute Exclusive Time from Stack Events
Compute Exclusive Time from Stack Events Given entry and exit events from one thread, compute the total exclusive running time of each function. The i...
Solve String Addition and Expression Evaluation
The interview included two coding problems: 1. Add numbers from character arrays - You are given two non-empty character arrays, where each array r...
Evaluate an arithmetic expression
Write a function that evaluates a mathematical expression given as a string. Requirements: - Supports non-negative integers and whitespace. - Supports...
Decode an encoded string
Implement a decoder for an encoded string where repetition is expressed with a number followed by a bracketed substring. Rules: - A pattern k[substrin...
Compute Latencies and Search Grid Path
You are given two coding tasks from an internship interview. Task 1: Compute Message Latency from CSV Logs Two systems, ComputeA and ComputeB, exchang...
Solve several coding interview problems
The interview included the following coding problems: 1. Decode ambiguous Morse text: Use the standard Morse mapping for letters A-Z. You are given a ...
Parse a protobuf-like schema and answer queries
You are given a single string schema describing message types in a simplified, protobuf-like language. Your task is to parse the schema and support tw...
Fixed-Width Text Display
Fixed-Width Text Display You are building a text display that renders a sequence of words inside a viewport of a fixed character width maxWidth. The d...