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."
Print all odd numbers from an integer list
Problem Given a list/array of integers nums, print (or return) every odd number in the list, in the same order they appear. Clarifications / follow-up...
Decode a password string into letters
A password is encoded as a string s using the following rules: - Numbers "1" to "9" map to letters a to i. - Numbers "10#" to "26#" (two digits follow...
Solve four OA algorithm problems
You are given four independent coding questions. 1) Count square subgrids (multiple queries) For each query, you are given two integers R and C repres...
Solve two grid problems (islands + min-cost path)
You are given two separate coding questions. Problem A: Count distinct islands (translation-equivalent) Given an m x n binary grid grid (0 = water, 1 ...
Find mode in a trinary search tree
You are given the root of a trinary search tree where each node has up to three children: `text class Node { int val; Node left; // all values ...
Assign tasks to workers with types and accounts
You are implementing a task scheduler. There are W workers (IDs 0..W-1) and N tasks (IDs 0..N-1). Each task i arrives at time arrival[i] (non-decreasi...
Boolean Expression Tree with Leaf Flips
Boolean Expression Tree with Leaf Flips You are given a boolean expression represented as a tree. - Each leaf node holds a boolean value: true or fals...
Normalize a file path
Given an absolute Unix-style file path as a string, return its canonical normalized form. Rules: - The input always starts with /. - A single . means ...
Solve Sliding Window and Grid Search
In a Software Engineer phone screen, the candidate was asked to solve two coding problems. 1. Longest substring with at most k distinct characters ...
Solve Maze and Suffix Problems
Solve the following two coding problems. Problem A: Find the shortest path through a maze with keys and doors You are given a 2D grid representing a m...
Find Feature Activation Order
You are building a feature-flag system for a product. There are n features labeled 0 to n - 1. Each dependency pair [a, b] means feature a depends on ...
Implement an in-memory file system
Implement an in-memory file system supporting basic directory and file operations. You must support the following methods (names are illustrative; any...
Design and implement an LRU cache
Problem Design and implement an LRU (Least Recently Used) Cache that supports the following operations in O(1) average time: - get(key) → returns the ...
Find Shortest Square-Sum Path
Given a positive integer n, find one shortest path from 0 to n where each step adds a perfect square number. Equivalently, return a shortest sequence ...
Implement Several Core Algorithmic Components
Solve the following independent coding tasks. 1. Implement an LRU cache. Design a class LRUCache with: - LRUCache(int capacity): initializes the...
Implement a BFS web crawler
A web crawler starts from a URL and explores reachable pages level by level. You are given: - start_url: string - An interface fetch_links(url: string...
Process exchange prints, volume checks, and client orders
You are writing a broker program that interfaces with an exchange via a stream of commands on stdin. You must process commands in order and write requ...
Parse logs and generate NFT attributes
You are given two independent coding tasks. Task 1: Parse and group a log file by thread ID You are given a list of log lines (strings). Each line con...
Implement Stable Softmax
Implement a function that computes the normalized exponential values of a list of real numbers. Given an array x of length n, return an array p of len...
Solve theatre seating and ticker extraction
Implement the following two coding tasks. 1. Allocate groups in a movie theater You are given an integer n representing the number of rows in a movie ...