Coding & Algorithms Interview Questions
Practice 3,013 real Coding & Algorithms interview questions for 2026. Coding & Algorithms interview questions for top tech firms like Meta, Amazon, Google, Uber, and TikTok — real questions from actual interviews with detailed solutions — to power your interview preparation. This collection is sharply focused on algorithmic patterns (arrays, strings, sliding windows, trees/graphs, dynamic programming, greedy, two-pointers, and hashing), clean, review-ready code, and the explanation skills that distinguish hires. In 2026 expect familiar medium-to-hard problems plus newer twists: AI-enabled or multi-file coding rounds at some companies, more emphasis on explainability and edge-case reasoning, and occasional real-world performance constraints (streaming, concurrency, memory limits). Interviewers evaluate problem framing, algorithm choice, complexity trade-offs, test-case thinking, and communication under time pressure. Best prep mixes pattern-based practice, timed mock interviews, code-review style polishing, and rehearsed explanations of complexity and tradeoffs. Focus your last-mile prep on writing correct, readable code quickly and on explaining why your solution is robust and efficient for production scenarios.

"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."
Explain OS processes, threads, and memory
Explain core operating system concepts: processes vs threads, context switching, and scheduling (preemptive vs cooperative and common algorithms). Des...
Implement tiered shipping calculator
Implement in JavaScript a shipping-cost calculator with three progressively richer pricing models based on a configuration object keyed by destination...
Implement concurrent order-accept/pickup simulator
Concurrent restaurant order + pickup simulator Design and implement a thread-safe simulation for a restaurant that: - Receives incoming orders concurr...
Find the second most frequent tag
You are given a list of strings in the following repeating order: [id1, name1, tag1, id2, name2, tag2, ...] So every 3 consecutive elements describe o...
Count k for consecutive-sum generator
An array generator service produces a consecutive-integers array starting at a positive integer k: [k, k+1, ..., k+m−1] for some m ≥ 1. The service re...
Implement Binary Search in C++
From scratch in C++, implement binary search over a sorted array to locate a target value. Provide a correct iterative implementation, handle not-foun...
Implement and Optimize Vector Multiplication
Implement vector–vector multiplication for dense vectors (e.g., dot product). Then, describe how you would optimize the implementation for a parallel ...
Design a coupon redemption system
Implement an in-memory coupon service supporting: addCoupon(code, discount, expiresAt, totalLimit, perUserLimit); redeem(userId, code, now) -> success...
Compute min operations to transform integers
Given integers A and B, transform A into B using the minimum number of operations. Allowed operations: ( 1) subtract 1 from the current value; ( 2) mu...
Solve grid min path and sqrt by binary search
1) Given an m x n matrix of non-negative integers, find a path from the top-left to the bottom-right that minimizes the sum of cell values. You may on...
Optimize switching puzzle solution
Consider a switching puzzle on an m×n grid of lights where toggling a cell flips its state and that of its orthogonal neighbors (Lights Out variant). ...
Find longest uniform substring after k replacements
Given a string s (ASCII, length up to 2e5) and integer k (0 ≤ k ≤ |s|), return the length of the longest substring that can be turned into all the sam...
Maximize products bought under budget
Given N products and M customers, for each customer find the list of distinct products they can buy without exceeding their budget such that the numbe...
Implement longest subarray summing to k
Given an integer array nums (length ≤ 200,000; values may be negative) and integer k, return the maximum length and the [l, r] indices of a contiguous...
Refactor code and enforce robustness
Code Review and Refactor: Summing a CSV Column Context You are reviewing a short Python script that sums a numeric column from a CSV using pandas. You...
Reverse linked lists, including k-group
Singly Linked List Reversal — Variants and Edge Cases You are given a standard singly linked list with nodes of the form: - Node fields: value, next -...
Solve date, shopping, and circle problems
Take‑Home: Three Independent Tasks (Data/Algorithms) Implement three independent functions that will be unit‑tested separately. Provide clear error ha...
Check palindrome number and next palindrome
Problem You are given a non-negative integer n. 1. Determine whether n is a palindrome in base-10 (it reads the same forward and backward). 2. Follow-...
Count Interior Islands After Flooding
You are given an m x n binary grid representing land and water. - 1 = land - 0 = water An island is a maximal group of land cells connected 4-directio...
Evaluate arithmetic expression using DFS
Given a string representing an arithmetic expression with non-negative integers, +, -, *, /, parentheses, and optional spaces, evaluate its value. Use...