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 maximum-occurring character in a string
Problem Given a non-empty string s, return the character that occurs the most times in s. Tie-breaking If multiple characters have the same maximum fr...
Answer static and streaming Top-K queries
Top-K in static and streaming settings (3 variants) You are given integers and asked to answer Top-K queries under three different scenarios. Variant ...
Minimize total factory cost with distance penalties
You must choose construction options for factories to minimize a total cost. Input format: - options[i] is a list of options for factory i. - Each opt...
Validate parentheses and find k-th largest
Problem A — Validate parentheses Given a string s containing only the characters '(', ')', '[', ']', '{', '}', determine whether the input string is v...
Extend a Maze Solver
You are given an existing codebase for a maze game and solver. The maze is represented as a 2D grid containing: - S: start cell - T: target cell - .: ...
Find minimum total range-increment to sort
You are given an integer array power[0..n-1] representing computational power of n servers. You may perform the following operation any number of time...
Crawl Same-Domain Links
Implement a Python function that crawls a website starting from a seed URL and returns all unique pages reachable within the same domain. Assume a hel...
Design a weighted random value generator
Weighted random value generator Design a generic component that stores values with integer weights and can return a random value with probability prop...
Validate CSV rows under multiple verification rules
You are given a multi-line string representing a CSV dataset. - The first line is a header. - Each subsequent line contains exactly 6 columns: col1,co...
Validate a JSON-like string
Problem You are given a string s that is intended to be a JSON text. Implement a function isValidJsonStructure(s) -> bool that checks structural valid...
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...
Check equal character frequencies
Given a string s, implement two functions: 1. Check whether all characters have equal frequency Return true if every distinct character in s appear...
Build a validated add-sub calculator
Given a string expression, write a function that validates and evaluates it. The expression represents arithmetic using only non-negative integers and...
Solve common array/string/linked-list tasks
You may be asked one or more of the following independent coding tasks. For each task, implement an efficient algorithm and clearly state time/space c...
Parse chemical formula with multipliers
Parse chemical formula with multipliers Given a string representing a chemical formula, parse it and return the total count of each element. The formu...
Evaluate a Four-Operator Expression
Implement a function that evaluates an arithmetic expression string containing non-negative integers, optional spaces, and the operators +, -, *, and ...
Merge overlapping intervals
Merge overlapping intervals Given a list of half-open numeric intervals [start, end), merge all overlapping or contiguous intervals and return a list ...
Compute average customer waiting time
Compute average customer waiting time You are given n customer orders; each order i = [a_i, p_i] where a_i is the arrival time and p_i is the preparat...
Evaluate arithmetic expression without parentheses
Evaluate arithmetic expression without parentheses Write evaluate(s: string) to compute the value of an arithmetic expression containing non-negative ...
Find shortest subarray to restore order
Given an integer array, find the shortest contiguous segment which, if sorted in ascending order, makes the entire array non-decreasing. Return the le...