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."
Implement basic calculator with four operations
Implement a basic arithmetic expression evaluator. Problem You are given a string s representing a mathematical expression containing non-negative int...
Implement stateful connection router simulator
You are implementing a simplified connection router / load balancer for a Jupyter-like multi-tenant server system. There are N target servers, indexed...
Maximize coins with tokens moving by +3
You are given a 1D board represented by a string s of length n. Each character is one of: - '.' — an empty cell - 'C' — a cell containing exactly one ...
Evaluate word-guess feedback with repeats
You are implementing feedback for a Wordle-like guessing game. Part 1 — Produce feedback for one guess You are given two strings of equal length guess...
Compute peak parking lot occupancy intervals
You are given logs from a parking lot system. Each log entry has the form: [carId, time, eventType] - carId is an integer identifying a car. - time is...
Implement string reduction and time map
In a coding interview, you are asked to solve two algorithm problems. 1. String reduction with adjacent duplicates - Basic version: Given a string ...
Implement JSON parsing and HTTP integration tasks
This question evaluates proficiency in JSON parsing, file I/O, HTTP client integration, request/response handling, payload construction, mapping data ...
Implement sin(x) with precision constraints
Coding Question: Implement sin(x) Implement a function that returns an approximation of the trigonometric sine function. Function signature - Input: a...
Find longest substring without repeating characters
Problem Given a string s, return the length of the longest contiguous substring that contains no repeated characters. Input - s: a string (may contain...
Count permutations with exactly n inversions
You are given two integers m and n. Consider all permutations of the array [1, 2, ..., m] (each number from 1 to m appears exactly once). A permutatio...
Implement a versioned recipe management system
You are asked to implement an in-memory Recipe Management System (similar in difficulty to a simple banking/in-memory DB exercise). The system support...
Count same-color squares in a character grid
You are given a 2D grid (matrix) of characters. Each character represents a color: cells with the same character are considered the same color. Formal...
Find the k-th largest element in an array
Given an integer array nums and an integer k, return the k-th largest element in the array. Notes: - The k-th largest element is the element that woul...
Count connected land components in a grid
You are given a 2D grid of characters where: - '1' represents land - '0' represents water A group of land cells forms an island if they are connected ...
Implement a basic pivot table with totals
You are given a small in-memory table of data and are asked to implement a simplified pivot table operation and a printer for it. Assume the input dat...
Find lowest common ancestor in tree
You are given the root of a binary search tree (BST) and two distinct nodes p and q that are guaranteed to exist in the tree. Task (BST case): - Find ...
Solve tree diameter and grid path problems
You are interviewing for a software engineer / ML intern role and are given the following algorithmic problems. --- Question 1: Longest Path in a Tree...
Count integer pairs satisfying 1/x + 1/y = 1/N
You are given a positive integer N (\(1 \le N \le 10^6\)). Consider the Diophantine equation: \[ \frac{1}{x} + \frac{1}{y} = \frac{1}{N}, \] where x a...
Maximize stock profit with one or two trades
You are given an array prices where prices[i] is the price of a given stock on day i (0-indexed). You want to maximize your profit by choosing when to...
Compute last-5-minute QPS in memory
Problem You are building a lightweight in-memory component that tracks the query load (QPS) of a service. Design a data structure with two operations:...