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."
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...
Compute tree right view and target-sum subarrays
You are given two separate programming tasks. --- Task 1: Right-side view of a binary tree You are given the root of a binary tree. Imagine standing o...
Reconstruct original array from doubled shuffle
Problem You are given an integer array changed that was produced from some unknown integer array original using the following process: 1. Start with o...
Count completed car journeys from sensor logs
You are given a time-ordered list of highway sensor logs. Each log entry contains: - timestamp (integer; strictly increasing) - sensor_type (one of "E...
Refactor a chat message processing function
Task You are given a poorly written JavaScript function that processes an incoming chat message and updates an in-memory store. The code is hard to re...
Validate Password Against Multiple Rules
Implement a password validation function for an account security system. You are given: - a string password - an integer min_length - a set of forbidd...
Check if each recipe is a contiguous subsequence
You are given: - An ordered ingredient list ingredients[0..n-1]. - A list of m recipes. Each recipe recipes[j] is itself a list of ingredients and is ...
Implement Prefix Search and Node Removal
This interview included two coding tasks: 1. Implement a prefix-search data structure for strings with two operations: insert(word) and count_with_pre...
Navigate unknown grid to locate target
You control a mouse in an unknown 2D maze. You do not know the maze dimensions or your absolute coordinates. The interface exposes move() → bool (atte...
Design IP/CIDR rule matcher
Design and implement a rule matcher that returns 'accept' or 'deny' for a given IPv4 address based on a set of rules. Each rule can be either an inclu...
Implement a recency-eviction bounded cache
Implement an in-memory key–value store with a fixed capacity N that uses recency-based eviction. Support: get(key) -> value or -1 if missing, and put(...
Design file deduplication algorithm
Design an algorithm to deduplicate files in a storage system. Compare fixed-size versus content-defined chunking and explain how you would choose hash...
Differentiate Java final, finalize, finally
Differentiate Java's final, finalize, and finally. Define what final means for variables, methods, and classes and give examples; explain what finaliz...
Implement prioritized refund allocation engine
Implement a refund allocation function that takes: (a) a list of payments, each with a unique paymentId, method ∈ {CREDIT, CREDIT_CARD, PAYPAL}, ISO-8...
Count islands on a torus grid
You are given an m x n binary grid representing water ( 0) and land ( 1) laid out on a torus: the top edge is adjacent to the bottom edge and the left...
Break a palindrome to smallest non-palindrome
Given a palindromic string s of lowercase English letters, change exactly one character to obtain a new string that is not a palindrome and is lexicog...
Remove minimum parentheses to balance string
Given a string s containing lowercase letters and the characters '(' and ')', remove the minimum number of parentheses so that the resulting string is...
Merge two interval lists into a union
You are given two lists of closed intervals [start, end]. Each list is individually sorted by start and contains non-overlapping intervals. Merge the ...
Implement robust debounce and throttle in JavaScript
Implement debounce(fn, wait, options) and throttle(fn, wait, options) in JavaScript. Support leading/trailing invocation toggles, maxWait for throttle...