Software Engineer Coding & Algorithms Interview Questions
Practice 2,306 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."
Find value on most distinct levels
Given a binary tree whose nodes store values (e.g., characters), find the value that appears on the greatest number of distinct depth levels. For exam...
Implement tree column grouping and minimal parentheses fixes
Part A — Binary tree column grouping: Given the root of a binary tree, group node values by their vertical columns from leftmost to rightmost using x-...
Maximize equal values via one subarray shift
Given an integer array A of length n, you may perform at most one operation: choose any contiguous subarray A[l..r] and add an integer Δ (which may be...
Implement Union-Find for connectivity
Implement a Disjoint Set Union (Union-Find) data structure with path compression and union by rank. Support operations: make_set, find(x), union(x, y)...
Design stack with O(1) minimum query
Design a stack-like data structure that supports the following operations, each in O(1) time: - push(x): push integer x onto the stack - pop(): remove...
Solve Four Interview Coding Problems
The interview included four coding problems of the following form: 1. Given a list of airline tickets represented as [from, to], use every ticket exac...
Implement a Datacenter Request Router
Implement a command processor for a request-routing system that manages datacenters. Each datacenter stores: - name - latitude in [-90, 90] - longitud...
Implement BFS shortest paths with reconstruction
Given an unweighted graph with n vertices and m edges represented as an adjacency list, implement breadth-first search (BFS) from a source vertex s to...
Implement XML tokenizer and parser with operations
Implement XML tokenizer and parser with operations You are given either (a) a raw XML-like string such as <catalog><book><author>Gambardella, Matthew<...
Implement LRU cache and prime products array
You are given two separate coding tasks. Task 1: Implement an LRU cache Implement an in-memory cache with a fixed capacity that evicts the least recen...
Implement core graph algorithms for graphics
Implement core graph algorithms for graphics Given a scene or dependency graph, implement topological sort, BFS/DFS, and shortest path (Dijkstra). Dis...
Maintain top N payers
Maintain top N payers Implement topNPayers(n) that returns the n accounts with the highest cumulative outgoing payment amounts as strings formatted "{...
Solve array merge and tree flattening problems
Solve array merge and tree flattening problems 1) Given two sorted arrays, merge them into a single sorted array. Provide both an in-place approach (w...
Explain a shader compiler pipeline
Explain a shader compiler pipeline Describe the architecture of a shader compiler that ingests GLSL/HLSL and outputs SPIR-V or ISA. Cover lexical anal...
Find k-th largest element in array
You are given an unsorted array of integers nums and a positive integer k. Design an efficient algorithm to find the k-th largest element in the array...
Design a Recoverable Iterator
Implement an iterator over a sequence that supports both normal traversal and state recovery. Design a class RecoverableIterator initialized with an a...
Implement string compression and decompression
Implement two functions for a simple string compression format. - compress(s): convert a string into groups of consecutive equal characters written as...
Design Minesweeper and Optimize Click Performance
Design a Minesweeper game. At game start, initialize an m×n board by randomly placing k bombs. Implement: ( 1) printBoard(): return a human-readable s...
Check near-palindrome with one deletion
Check near-palindrome with one deletion Given a string s, determine whether it can become a palindrome after deleting at most one character. Return bo...
Find buildings with rightward view
Find buildings with rightward view You are given an array of building heights aligned along a street that faces the ocean to the right. Return the ind...