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."
Can two names match with ≤2 swaps?
You are given two restaurant names represented as strings s and t of equal length (same character set, case-sensitive). In one operation, you may swap...
Assign tennis bookings to minimum courts
Expanding Tennis Club (Interval Scheduling) You run a tennis club with an unlimited number of courts. Each booking has a start and finish time. `text ...
Find motion intervals above threshold
You are processing data from a single security camera. You are given: - A threshold value T (a real number). - A vector (array) of time-stamped motion...
Remove Target Values from a Linked List
Given the head of a singly linked list and an integer target, remove every node whose value equals target and return the new head of the list. The tar...
Build an Account Transfer Ledger
Implement a transaction processor for a payment platform. You are given a list of transaction records. Each record contains: - id: unique transaction ...
Count segments and optimize 3-server assignment
There are two independent programming tasks. --- Problem 1: Transaction Segments You are given: - An integer n, the length of an array. - An integer k...
Analyze time complexity for dictionary operations
Analyze the time complexity of the following dictionary/hash map operations. (a) Searching for a key: state average-case and worst-case time, and expl...
Settle debts with minimal transactions
You are given a list of debts among a set of people, expressed as triples (debtor, creditor, amount) (equivalently (payer, payee, amount)), where each...
Reconstruct a binary tree from traversals
Coding: Build a Binary Tree from Two Traversals You are given two integer arrays representing traversals of the same binary tree: - preorder: node ord...
Find missing rank in a straight
You are given a list of 4 distinct characters representing card ranks from a 5-card straight (5 consecutive ranks) with exactly one rank missing. Rank...
Find k-th recipient in command propagation order
Chain of Command (k-th Receiver in DFS-by-Child-Id Order) A company org chart forms a rooted tree with n people (nodes), labeled 1..n. You are given a...
Find a secret word via match feedback
Word Guessing Game (Mastermind-style) You are given a list of unique candidate words wordlist. All words have the same length L and contain only lower...
Reverse Nodes in K-Sized Groups
Given the head of a singly linked list and an integer k, reverse the nodes of the list in contiguous groups of size k. Requirements: - Only complete g...
Find a valid course order from prerequisites
You are given numCourses labeled from 0 to numCourses-1 and a list of prerequisite pairs prerequisites, where each pair [a, b] means you must complete...
Implement a Timestamped Counter
Implement a data structure that records calls to an increment method. Requirements: - Each call to increment(timestamp) receives an integer timestamp....
Implement encryption and constant-time random set
You are asked about two coding topics from an onsite interview: 1. Key-based string encryption Briefly explain the idea of shared-secret encryption...
Implement a Versioned Key-Value Store
Design and implement an in-memory versioned key-value store. Requirements: - put(key, value, timestamp): store value for key at the given integer time...
Compute Earliest Completion Times
You are given n tasks numbered from 0 to n - 1. Each task i has a positive duration duration[i]. You are also given a list of prerequisite relationshi...
Count Numbers Inside All Intervals
You are given: 1. An integer array nums. 2. A list of intervals intervals, where each interval is represented as [start, end]. The intervals are not s...
Implement an asyncio-based chat server
Async Chat Server (Python asyncio) Build a TCP chat server using Python's asyncio. The server listens on a given port and serves many concurrent clien...