Coding & Algorithms Interview Questions

Practice 3,469 real Coding & Algorithms interview questions for 2026. Covers companies like Meta, Amazon, Google, Uber, and Microsoft. Real questions from actual interviews with detailed solutions — ideal for focused interview preparation. Coding & Algorithms interview questions are the single most common technical gate for software engineering roles and are used to evaluate problem framing, algorithm selection, complexity trade-offs, correctness, edge-case reasoning, and clear communication under time pressure. Expect this category to appear in early technical screens and repeatedly across onsite loops at companies that weight it heavily (notably Meta, Google, and Amazon). Interviews will test arrays and strings, trees and graphs, dynamic programming, hashing and two‑pointer techniques, and the candidate’s ability to test and optimize code in a shared editor. Prepare with timed mock interviews, practice in the same editor you’ll use live, and build a progressive schedule that moves from fundamentals to medium/hard problems; typical candidates invest several weeks to a few months of focused practice depending on seniority and target company.

3.5k Questions 368 Companies08.11.2026
Showing 20 results
Role
Stripe logo
Stripe
Medium
Software Engineer

Implement Card Validation and Recovery System

Question Design and implement a payment-card validation system supporting: Basic VISA validation (16-digit numbers starting with 4) using the Luhn che...

Coding & Algorithms
2
0
21 people solved
Aug 4, 2025
OpenAI logo
OpenAI
Medium
Machine Learning Engineer

Find earliest supporting dependency version

Question Given a list of dependency versions (e.g. [103.003.02, 103.003.03, 203.003.02]) and a black-box API isSupported(v), design an algorithm to fi...

Coding & Algorithms
66
0
501 people solved
Aug 4, 2025
Squarepoint Capital logo
Squarepoint Capital
Medium
Data Scientist

Compute drawdown, profit, and coin change

Question What is the maximum drawdown of a cumulative PnL (profit and loss) series, and when did it occur? Implement a function mdd(pnl) that returns ...

Coding & Algorithms
7
0
60 people solved
Aug 4, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Implement bank balance operations

Question Design and implement a Bank account class that supports the operations Deposit(amount), Withdraw(amount), and CashBack(percent). Ensure balan...

Coding & Algorithms
4
0
58 people solved
Aug 4, 2025
Meta logo
Meta
Medium
Software Engineer

Solve weighted pick and product except self

Question LeetCode 528. Random Pick with Weight LeetCode 238. Product of Array Except Self https://leetcode.com/problems/random-pick-with-weight/descri...

Coding & Algorithms
5
0
36 people solved
Aug 4, 2025
Netflix logo
Netflix
Medium
Software Engineer

Solve non-repeating show substring

Question LeetCode 3. Longest Substring Without Repeating Characters – variant where the elements are show names instead of numbers. https://leetcode.c...

Coding & Algorithms
12
0
194 people solved
Aug 4, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Maximize path score in DAG

Question Given a weighted directed acyclic graph (DAG) where each node v has a score w(v) and each edge (u→v) has a time cost t(u,v), starting from no...

Coding & Algorithms
18
0
226 people solved
Aug 4, 2025
Meta logo
Meta
Medium
Data Engineer

Validate carpool capacity

Question LeetCode 1094. Car Pooling – Given trips[i] = [numPassengers, start, end] and an integer capacity, return true if the vehicle can fulfill all...

Coding & Algorithms
5
0
68 people solved
Aug 4, 2025
Uber logo
Uber
Medium
Software Engineer

Implement rate limiter, top-K, scheduler algorithms

Question Design and implement a thread-safe Rate Limiter; extend it to support multi-threading and a version where current time is not passed as an ar...

Coding & Algorithms
6
0
64 people solved
Aug 4, 2025
DRW logo
DRW
Medium
Machine Learning Engineer

Implement portfolio optimization simulation

Question Given price-return time series in a DataFrame, simulate random portfolio weights, compute expected return, volatility, Sharpe ratio, and retu...

Coding & Algorithms
3
0
42 people solved
Aug 4, 2025
Instacart logo
Instacart
Medium
Software Engineer

Optimize file reading and expression DFS

Optimize file reading and expression DFS Given a large password file, build a program to read the required password(s) while minimizing memory usage. ...

Coding & Algorithms
20
0
137 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find concatenated words in list

Question LeetCode 472. Concatenated Words – Given an array of strings words, return all words that are concatenations of at least two shorter words al...

Coding & Algorithms
4
0
34 people solved
Aug 4, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Count subarrays summing to target

Question LeetCode 560. Subarray Sum Equals K – Given an integer array nums and an integer k, return the total number of continuous subarrays whose sum...

Coding & Algorithms
10
0
10 people solved
Aug 4, 2025
Current logo
Current
Medium
Software Engineer

Compute balances and array queries

Question Given a list of transactions where each transaction has a userId and an amount (positive for credit, negative for debit), compute the final b...

Coding & Algorithms
5
0
53 people solved
Aug 4, 2025
Bloomberg logo
Bloomberg
Medium
Software Engineer

Solve Number of Islands

Question LeetCode 200. Number of Islands – Given a 2D grid of '1's (land) and '0's (water), count the number of islands. Follow-up: implement the solu...

Coding & Algorithms
6
0
78 people solved
Aug 4, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Solve string match and DashMart BFS

Question Implement a string-matching function that returns the first index of a pattern in a text (akin to LeetCode 28 Implement strStr()). 2) “Dash M...

Coding & Algorithms
7
0
67 people solved
Aug 4, 2025
Instacart logo
Instacart
Medium
Software Engineer

Compute immediate delivery percentage

Compute immediate delivery percentage LeetCode 1173. Immediate Food Delivery I – Write an SQL query to calculate the percentage of immediate (same-day...

Coding & Algorithms
10
0
123 people solved
Aug 4, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Check diagonal and compute window statistics

Question Given a square matrix, determine whether all elements on its main diagonal are identical. LeetCode 346. Moving Average from Data Stream – des...

Coding & Algorithms
9
0
70 people solved
Aug 4, 2025
Vanta logo
Vanta
Medium
Software Engineer

Design test-run logging and query functions

Question Implement log(test_id, timestamp, status) to record a test run, where timestamps are strictly increasing across all test IDs. Implement get_m...

Coding & Algorithms
29
0
243 people solved
Aug 4, 2025
Shopify logo
Shopify
Medium
Data Scientist

Implement Cosine Similarity Function for String Vectors

Scenario Technical phone screen in Python; assess ability to implement similarity metric. Question Implement a Python function that computes the cosin...

Coding & Algorithms
9
0
103 people solved
Aug 4, 2025

Frequently Asked Questions

How difficult are Coding & Algorithms interview questions?
Difficulty spans a wide range: from quick easy warm-ups to multi-stage hard problems that require advanced data structures or algorithmic proofs. Most companies place a majority of live coding rounds at the medium level, with occasional hard questions used to distinguish senior candidates. Interviewers evaluate problem framing, algorithm choice, time/space complexity, clean implementation, and thoughtful testing under time pressure. Expect more conceptual depth at Google, more consistent medium-to-hard screens at Meta, and Amazon to mix coding with leadership signals. Leveling depends on role and seniority: entry-level focuses on fundamentals; senior roles emphasize design, optimizations, and tradeoffs.
Where does Coding & Algorithms appear in a typical interview loop, and which companies weight it most heavily?
Coding & Algorithms is usually the first technical hurdle: it appears in phone/online screens, followed by one or more onsite or virtual coding rounds during the loop. Typical sequences are a technical screen, two to three in-loop coding sessions, then system design or behavioral rounds. Companies that weight this category heavily include Google, Meta, and Amazon, where coding performance often determines whether you progress. Candidates commonly concentrate practice for weeks or months beforehand; most targeting large tech firms prepare intensively for 6–12 weeks, while some spend 3–6 months for deeper mastery or level changes.
How long should I prepare and how should I structure that preparation?
Plan focused, progressive practice over a realistic timeline. A practical structure is an 8–12 week block: weeks 1–2 solidify fundamentals and language fluency; weeks 3–6 target core patterns (arrays, trees, graphs, DP) with timed problem sessions and pattern tagging; weeks 7–9 emphasize mock interviews, end-to-end problem solving, and optimization tradeoffs; final weeks simulate real loops with full-length sessions and targeted weak-point drills. Candidates with less experience may extend to 12–16 weeks. Regularly review mistakes, practice communicating solutions aloud, and include at least one weekly mock interview with peer or coach feedback.
What key subtopics and patterns should I master for Coding & Algorithms interviews?
Master a consistent set of patterns and their variations: arrays and strings (two pointers, sliding window), hash maps and frequency counts, sorting and binary search, recursion and backtracking, dynamic programming, trees and traversals, graphs (BFS/DFS, shortest paths, union-find), heaps and priority queues, and greedy algorithms. Also practice complexity analysis, space-time tradeoffs, and writing bug-resistant code with tests. For higher levels, focus on amortized analysis, advanced graph algorithms, segment trees or Fenwick trees, and system-aware optimizations. Interviewers value reusable problem templates and the ability to generalize patterns to new prompts.
What are standout tips and common pitfalls to avoid in Coding & Algorithms interviews?
Start by clarifying requirements and constraints, then outline your approach before coding. Write a correct, readable baseline solution first, then iterate to improve complexity while narrating tradeoffs. Test with simple and edge cases, and handle nulls, off-by-one, and empty inputs explicitly. Communicate continuously; silence looks like confusion. Avoid premature optimization, overcomplicating solutions, or ignoring interviewer hints. Time management matters: if stuck, discuss alternate approaches and code a partial solution. Finally, practice mock interviews to reduce anxiety and build the habit of clear, structured explanations under pressure.

Explore more Coding & Algorithms interview questions

Jump straight to Coding & Algorithms questions at a specific company or for a specific role.

By company
By role