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
Amazon logo
Amazon
Medium
Software Engineer

Implement two array-cost minimization algorithms

Implement two array-cost minimization algorithms that appeared back-to-back in an AWS SDE online assessment. Each can be solved independently. Part 1 ...

Coding & Algorithms
4
0
36 people solved
Aug 7, 2025
Robinhood logo
Robinhood
Medium
Software Engineer

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...

Coding & Algorithms
11
0
126 people solved
Aug 7, 2025
PayPal logo
PayPal
Medium
Software Engineer

Compare write-back vs write-through caches

Compare write-back and write-through caching policies. Explain how each handles writes, coherence, durability, latency, and bandwidth; discuss typical...

Coding & Algorithms
2
0
43 people solved
Aug 7, 2025
Chime logo
Chime
Medium
Software Engineer

Compute minimum time with task cooldowns

You are given a multiset of task types represented by uppercase letters (e.g., A, A, A, B, B, C). Each task takes exactly 1 time unit to execute. Runn...

Coding & Algorithms
33
0
283 people solved
Aug 7, 2025
Meta logo
Meta
Medium
Software Engineer

Check near-palindrome with one deletion

Check near-palindrome with one deletion Given a string s, determine whether it can become a palindrome after deleting at most one character. Return bo...

Coding & Algorithms
3
0
28 people solved
Aug 7, 2025
Meta logo
Meta
Medium
Software Engineer

Compute binary tree diameter

Compute binary tree diameter Given the root of a binary tree, compute the tree's diameter defined as the maximum number of edges on any path between t...

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

Compute weighted sum of nested lists

Compute weighted sum of nested lists Given a nested collection that can contain integers or other nested collections, compute the depth-weighted sum w...

Coding & Algorithms
7
0
52 people solved
Aug 7, 2025
UiPath logo
UiPath
Medium
Machine Learning Engineer

Compute Minimum L-Moves on Infinite Grid

Compute Minimum L-Moves on Infinite Grid On an infinite 2D grid, a chess-like piece moves in L-shapes: from (x, y) it can go to (x±1, y± 2) or (x±2, y...

Coding & Algorithms
2
0
25 people solved
Aug 7, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Find second-minimal word segmentation count

Find second-minimal word segmentation count Given a string s and a dictionary D of non-empty words, define a 'segmentation' as splitting s into a sequ...

Coding & Algorithms
4
0
33 people solved
Aug 7, 2025
SoFi logo
SoFi
Medium
Software Engineer

Determine reachability and minimum jumps

Determine reachability and minimum jumps Given an array of non-negative integers nums of length n, where nums[i] is the maximum number of steps you ca...

Coding & Algorithms
7
0
78 people solved
Aug 7, 2025
Bridge logo
Bridge
Medium
Software Engineer

Design Minesweeper and Optimize Click Performance

Design a Minesweeper game. At game start, initialize an m×n board by randomly placing k bombs. Implement: ( 1) printBoard(): return a human-readable s...

Coding & Algorithms
8
0
67 people solved
Aug 7, 2025
Oracle logo
Oracle
Medium
Software Engineer

Minimize sum with halving operations

Minimize sum with halving operations You are given an array of non-negative integers nums and an integer k. In one operation, choose any index i and r...

Coding & Algorithms
4
0
47 people solved
Aug 7, 2025
Amazon logo
Amazon
Medium
Software Engineer

Determine reachability and optimize task scheduling

Question LeetCode 780. Reaching Points: Given four integers a, b, c, d (1 <= a, b, c, d <= 1000). Starting from (a, b) you may repeatedly apply either...

Coding & Algorithms
2
0
38 people solved
Aug 4, 2025
Uber logo
Uber
Medium
Software Engineer

Find minimal rate k and subset sum

Question LeetCode 875. Koko Eating Bananas — Given vault sizes [3, 6, 7, 11] and time h = 8 hours, find the minimum integer rate k (vault units per ho...

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

Solve UTF-8 Validation & Shortest Path

Question LeetCode 393. UTF-8 Validation LeetCode 1091. Shortest Path in Binary Matrix https://leetcode.com/problems/utf-8-validation/description/ http...

Coding & Algorithms
2
0
37 people solved
Aug 4, 2025
Capital One logo
Capital One
Medium
Machine Learning Engineer

Solve matrix rotation and 1-D illumination

Question LeetCode 48. Rotate Image – rotate an n×n matrix 90° clockwise (extra space allowed). Find the point(s) with the maximum number of illuminate...

Coding & Algorithms
4
0
11 people solved
Aug 4, 2025
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

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