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 fair split of a two-color necklace
Given a circular necklace represented by a string s over {'a','b'}, you may cut the necklace at most twice (yielding three contiguous pieces). Can you...
Implement string-based candlestick classifier
Implement a function that takes a single input string encoding N daily OHLC price records in the format "o1,h1,l1,c1;o2,h2,l2,c2;...;oN,hN,lN,cN" (sem...
Implement a sliding-window rate limiter
Implement an in-memory sliding-window rate limiter. You are given a stream of requests, each with a timestamp in milliseconds. Part 1: Per-user limit ...
Generate all strings by expanding wildcards
Problem Given a string s consisting only of characters '0', '1', and '', replace every '' with either '0' or '1' and return all possible resulting bin...
Count anagram-based replacements per phrase
Problem You are given: - phrases: a list of strings, where each string is a phrase containing words separated by single spaces. - words: a list of str...
Implement Cache Eviction And Seat Assignment
Solve the following two independent coding tasks. Task 1: Implement a least-recently-used cache Design a class LRUCache with the following methods: - ...
Find and Merge Camera Alert Intervals
You are given surveillance camera readings as time-series data. Each reading is a pair (timestamp, value), sorted by timestamp. A camera is considered...
Implement a Log Rate Limiter
You are building a backend logging service. Implement a class that decides whether an incoming log message should be emitted. Each request provides: -...
Solve chat, grid paths, and car rentals
You are given three independent programming tasks. For each, describe and implement an efficient algorithm, and be prepared to analyze its time and sp...
Implement Text Layout and Query Parsing
This interview note described two coding tasks. 1. Format multiple articles into lines Write a function that takes: - articles: a list of articl...
Compute ways to climb n steps
Implement a function that returns the number of distinct ways to reach the top of a staircase with n steps if you can climb either 1 or 2 steps at a t...
Check whether a string is a palindrome
Problem Given a string s consisting only of lowercase English letters (a-z), determine whether s is a palindrome. A palindrome reads the same forward ...
Find largest digit-sum bucket size
You are given two integers low and high (inclusive). Define s(x) as the sum of the decimal digits of x. For every integer x in [low, high], place x in...
Decide and implement DP/heap and approximation
You have 90 minutes to complete three related coding tasks: a) Dynamic programming: Given an integer array nums (n ≤ 2e 5) and a threshold T, design a...
Implement undo/redo with two stacks
Problem: Undo/Redo for a Simple Text Editor Design a data structure that simulates a very small text editor with undo and redo. You are given a sequen...
Determine Whether P's Position Is Unique
You are given an R x C rectangular grid and a set of named entities. Each entity must be placed in exactly one distinct cell. You are also given a col...
Design an autocomplete suggestions API
Problem: Autocomplete suggestions (Trie) You are building an autocomplete feature. Input - A dictionary of n unique words words[i] (lowercase a–z). - ...
Implement an LRU cache
LRU Cache Design and implement a fixed-capacity Least Recently Used (LRU) cache. Operations - get(key) -> value | -1/null: Return the value if present...
Count business days excluding holidays
Problem: Count Working Days Between Two Dates Given a start date, an end date (inclusive), and a set of holiday dates, compute the number of working d...
Find numbers with exactly two sum-of-squares forms
Given an integer \(n\), find all integers \(s\) such that \(0 \le s < n\) and \(s\) can be expressed as a sum of two squares in exactly two distinct u...