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."
Validate a bracket string
Given a string s containing only the characters '(', ')', '{', '}', '[', and ']', determine whether the input string is valid. A string is valid if: 1...
Implement a Tic-Tac-Toe game class
Problem Implement a class that supports playing an n × n Tic-Tac-Toe game. Requirements Create a class TicTacToe(n) with: - move(row, col, player) -> ...
Describe std::string copy semantics
Describe std::string copy semantics In C++, what happens with std::string when you write: std::string a = "123"; std::string b = a; Describe which ope...
Sort products by price and attention score
You are given a list of strings, each formatted as "product,price,attention". Parse the list into records and return the product names sorted to prior...
Explain Java volatile semantics
Explain Java volatile semantics What does the volatile keyword guarantee in Java's memory model? Describe visibility, ordering (happens-before), and r...
Implement a Rollback Key-Value Store
Design and implement an in-memory key-value store that supports rollback. The store should support at least the following operations: - set(key, value...
Find largest filename from ls -l output
You are given a multi-line string (via stdin) that represents the output of ls -l, with one entry per line. Each file line follows the typical ls -l f...
Find smallest start index avoiding left exit
You are given an integer array jump of length n (0-indexed). If you are currently at index i, your next position becomes i + jump[i] (a positive value...
Maximize coins collected by tokens jumping +3
You are given a single-player board game represented by a string board of length N (1 ≤ N ≤ 100). Each character is one of: - '.': empty cell - 'T': a...
Implement an Alert Execution Engine
You are given an alert client API that provides alert configurations, metric query execution, and notification methods. Implement an alert execution e...
Solve Magic Dictionary and unknown traversal
Solve Magic Dictionary and unknown traversal LeetCode 676. Implement Magic Dictionary Determine and implement traversal/encoding that outputs nodes as...
Solve sliding window and tree BFS
Solve sliding window and tree BFS Solve a typical medium-level sliding-window problem (e.g., longest substring without repeating characters). LeetCode...
Implement persistent key-value store
Question Design and implement an in-memory key-value store supporting set(key, value), get(key), shutdown() that flushes all data as bytes to a medium...
Count partitions and equal-cost packages
Question Given a string itemCategories, count the number of ways to partition it into exactly two contiguous non-empty substrings (a prefix and a suff...
Find hotel pairs to cover a split stay
You are implementing a simplified “split stay” feature. Problem You are given: - n hotels (or listings), indexed 0..n-1. - For each hotel i, an unsort...
Count subarrays summing to target
Given an integer array nums and an integer target T, return the number of contiguous subarrays whose sum equals T. Provide an algorithm that runs in l...
Solve load balancing and perfect pairs
1) Contiguous load balancing: You have n identical resources (servers) and m ordered tasks with processing times burstTime[0..m-1]. Each server must b...
Implement expression expansion to plus-only form
Given a string expression consisting only of lowercase letters (variables), '+', '*', '(', and ')', return an equivalent expression that uses only '+'...
Check near-palindrome with one deletion
Given a string s, determine if it can become a palindrome after deleting at most one character. Return true or false and provide time and space comple...
Compute waits and find distance-k node pairs
Part 1 — Array next-higher wait: Given an integer array A where A[i] is the measurement for day i (0-indexed), return an array W of the same length su...