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."
Connect next pointers for each tree level
You are given the root of a binary tree where each node has fields left, right, and next (initially null). For every node, set its next pointer to the...
Implement Wordle-style word guessing solver
Implement Wordle-style word guessing solver Implement a program to solve a Wordle-style word guessing game. The game has a hidden target word of fixed...
Identify and prevent code-breaking inputs
Identify and prevent code-breaking inputs Identify inputs and scenarios that could break your implementation and explain how you would prevent them. C...
Implement O(1) randomized multiset
Implement O(1) randomized multiset Write code for a data structure that supports add(x), remove(x), and getRandom() in average O( 1) time where duplic...
Compute sum of longest positive subarray
Compute sum of longest positive subarray Given an integer array that may contain positive and negative numbers, find the sum of the longest contiguous...
Solve classic coding interview problems
These problems evaluate algorithmic problem-solving skills including dynamic programming and combinatorics for the egg-dropping scenario, array manipu...
Count Similar Photo Groups
You are given n photos labeled 0 to n - 1 and an n x n binary matrix isSimilar. - isSimilar[i][j] = 1 means photo i and photo j are directly similar. ...
Implement greedy decoding and beam search
You are given access to an auto-regressive language model that can score the next token based on a prefix. Assume: - next_logprobs(prefix_tokens) -> M...
Design structure for top-K frequent elements
You are working with a large collection of items represented by integer IDs (e.g., product IDs, user IDs, etc.). Updates and queries arrive over time....
Simulate a Turn-Based Two-Player Game
This question evaluates API design, state management, move validation, board representation, and correctness guarantees for a turn-based game simulato...
Solve tree, array, and maze tasks
This set of problems evaluates proficiency in algorithms and data structures, covering binary tree diameter computation, array optimization for maximu...
Implement Plurality and Runoff Voting
You are given a list of ballots for an election. Each ballot is an ordered list of distinct candidate names, from highest preference to lowest prefere...
Check if a word exists in a grid
Given an m×n grid of characters and a string word, determine whether the word can be formed by sequentially adjacent cells (adjacent means horizontall...
Remove nodes with a given value
This question evaluates proficiency in singly linked list manipulation, specifically pointer handling and in-place node removal, and falls under the C...
Compute max planes shot and session count
Problem 1: Max planes you can shoot before any lands You are given two equal-length arrays: - altitude[i]: the initial altitude of plane i (positive i...
Find shortest relationship path using BFS
This question evaluates proficiency in graph representations and traversal algorithms—specifically BFS and adjacency-structure construction—for comput...
Implement an in-memory storage with TTL and scans
This question evaluates implementation of an in-memory two-level key->field->value store with TTL semantics, lexicographic scans and prefix filtering,...
Solve multiple algorithmic interview questions
Below are several independent coding tasks. For each task, implement a function that returns the required output. Assume: - Arrays/lists are 0-indexed...
Find intersection of two line segments
Problem Given two 2D line segments AB and CD, determine whether they intersect. Each segment is defined by its endpoints: - A(x1, y1), B(x2, y2) - C(x...
Compute effective permissions on DAG and prune tree
This set of problems evaluates proficiency in graph and tree algorithms, specifically transitive state propagation and conflict resolution on a DAG (e...