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."
Count non-decreasing arrays by digit sums
You are given an array required_sums of length n. Count how many non-decreasing arrays result[1..n] of integers satisfy all of the following: ( 1) for...
Implement BST vertical traversal and list conversion
Given the root of a binary search tree (BST): 1) Implement vertical order traversal: assign the root column 0, left child column −1, right child colum...
Solve minimum rate and subset sum
1) Minimum rate to finish vaults within a deadline: You are given an array vaults of positive integers representing the amount in each vault along a r...
Implement valid 1-D convolution with bias
Question Implement a "valid" 1-D convolution function in the cross-correlation sense. Given an input array of numbers, a kernel (filter) array of numb...
Implement precise string-based decimal addition
Given two non-empty strings representing decimal numbers (e.g., "123.456" and "6234.42432"), implement a function that returns their exact sum as a st...
Design a queue and analyze tradeoffs
Design a FIFO queue data structure that supports enqueue, dequeue, peek, and isEmpty. Compare implementations using a singly linked list, a dynamic ar...
Solve jumps and anagram-similarity problems
You are given two independent tasks. Task A (Maximize calories over jumps): - There are n blocks with integer heights height[i] ≥ 0. - You start on th...
Find top-k frequent elements efficiently
Given an array (or stream) of integers and an integer k, return any ordering of the k most frequent values. Implement a solution using a heap and disc...
Compute build order from dependencies
Given a set of package build dependencies, output a valid build order so that each package is built only after all of its dependencies. The input is a...
Design server allocation for multi-type nodes
Design a service to manage a large pool (about 100, 000) of server nodes. Each node can satisfy multiple instance types; clients call getServer(reqNum...
Compute vertical order of a BST
Compute the vertical order traversal of a binary search tree. Define coordinates so the root is at column 0, row 0; the left child is (col−1, row+ 1) ...
Implement a Simulated Memory Allocator
Implement a simulated memory allocator that supports allocate(size) and free(ptr) operations analogous to malloc and free. Treat memory as a contiguou...
Design a single-machine LRU cache
Design an in-memory LRU cache for a single machine using a hash map and a doubly linked list to support O( 1) get and put. Explain how you handle capa...
Implement 2D word search variants and analyze complexity
Given an m x n grid of uppercase letters board and a string word, implement two related functions: ( 1) Fixed-direction search: Return true if word ap...
Refactor rock–paper–scissors for config and ties
Refactor an existing Rock–Paper–Scissors tournament with three robot players so that the number of rounds is configurable and the system also tracks t...
Maximize optional tasks under daily limit
You are given an integer limit and two integer arrays required and optional of length n. For each day i, you must schedule required[i]. If time remain...
Solve a two-jug measuring problem
You are given two jugs with capacities x and y liters and an unlimited water source. You may perform these operations: fill a jug, empty a jug, or pou...

Compute community ranges and town idle hours
You are given two in-memory datasets for a party-planning app. 1) PartyWindow: {partyId: string, startTime: ISO-8601 UTC datetime, endTime: ISO-8601 U...
Design a fixed-capacity circular queue
Design a fixed-capacity circular queue that supports enqueue(x), dequeue(), front(), rear(), isEmpty(), and isFull() operations in O( 1) time. Impleme...
Verify permutation in-place and implement fast power
1) Given an integer list A of length n, determine whether A is a permutation of [0, 1, ..., n-1]. Do it in-place with O( 1) extra space (no auxiliary ...