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."
Maximize profit from non-overlapping jobs
You are given up to N = 200,000 jobs; each job i has a start time s_i, end time e_i (s_i < e_i), and reward w_i. Select a subset of non-overlapping jo...
Compute the Nth Recency Value
Given an integer n >= 1, define a sequence a as follows: - a[0] = 0 - For each i >= 1: - If a[i - 1] has appeared earlier in the sequence, meaning t...
Design a key-value store with getLast
Design a key-value store with getLast Design and implement an in-memory key–value store with this API: add(key, value), get(key), remove(key), and get...
Group employees by shared interests
Given N employees, each with an integer id and a set of interests (strings), write an algorithm to find all employees who share at least one common in...
Copy linked list with random pointers efficiently
Copy linked list with random pointers efficiently Given the head of a singly linked list where each node has next and random pointers, create a deep c...
Implement an IPv4 Iterator
Implement an iterator over IPv4 addresses. Start with a basic version: 1. Given a start IPv4 address and an end IPv4 address, support forward iteratio...
Compute unmatched parentheses length
Problem You are given a string s consisting only of characters '(' and ')'. Repeatedly remove any matched pair of parentheses as part of a valid paren...
Implement Cache and Key-Value Store
The interview report mentions coding tasks similar to the following: 1. Bounded cache Implement a cache with a fixed capacity. Support: - get(ke...
Track Customer Referral Revenue
Design a data structure to track customers and referral-based revenue. Implement the following operations: - int insertNewCustomer(double revenue) -...
Find K most frequent elements
Problem You are given an array of integers nums and an integer k. Return the k elements that occur most frequently in nums. You may return the answer ...
Find conflicting pair using black-box run()
Problem You are given a list tests of n distinct test cases (you can treat them as IDs or objects). You also have access to a black-box function: - ru...
Implement Three Research Coding Tasks
Solve the following coding problems. 1. Implement a differentiable matrix product You are given a list of k square matrices M1, M2, ..., Mk, all of sh...
Find dictionary words matching a phone digit string
You are given: - A digit string digits consisting of characters '2'–'9'. - A list of lowercase words words (dictionary). Use the classic phone keypad ...
Compute infection spread time
You are given an m x n grid representing a population during an outbreak: - 0 = empty cell - 1 = healthy person - 2 = infected person Every minute, ea...
Convert an IP range to minimal CIDRs
Problem Given a starting IPv4 address ip and a non-negative integer n, output the smallest possible list of CIDR blocks that exactly covers n consecut...
Implement a Tic-Tac-Toe game API
Problem Design and implement a Tic-Tac-Toe game class that supports playing moves on an n x n board. Requirements - Two players, represented by intege...
Find shortest subarray with ≥k distinct integers
Given an integer array nums of length n and an integer k, find the length of the shortest contiguous subarray that contains at least k distinct intege...
Implement sparse matrix storage, addition, and multiplication
Design a way to store a sparse matrix (most entries are zero) and implement efficient operations. You are given matrices using their non-zero entries:...
Solve common search/parse/graph frequency tasks
You are given several independent coding tasks. For each task, write a function that returns the required output. 1) Find insertion index in a sorted ...
Solve three interview coding problems
This interview report described three coding tasks: 1. Generate a run-length spoken sequence Start with s1 = "1". To build the next term, read th...