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

Simulate toppling board game outcome

Implement a function that, given the board size N (3–9 inclusive) and a list of move strings, returns one of: "in progress", "player 1 is the winner",...

Coding & Algorithms
32
0
286 people solved
Jul 27, 2025
Meta logo
Meta
Medium
Software Engineer

Evaluate expression without stack, constant space

Evaluate expression without stack, constant space Given a string s representing a valid arithmetic expression of non-negative integers, the operators ...

Coding & Algorithms
2
0
39 people solved
Jul 27, 2025
Lyft logo
Lyft
Medium
Software Engineer

Design a temporal key-value store with historical reads

Implement a key–value store supporting set(key, value, timestamp) and get(key, timestamp) -> the value at the greatest timestamp ≤ the given timestamp...

Coding & Algorithms
7
0
85 people solved
Jul 27, 2025
Optiver logo
Optiver
Easy
Data Scientist

Stone Pile Doubling Game: Can One Pile Be Emptied?

You are given two piles of stones containing a and b stones respectively (both piles start non-empty). You repeatedly apply the following move: - Let ...

Coding & Algorithms
0
0
3 people solved
Jul 26, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Count clusters covered by dashers

Count clusters covered by dashers You are given two m×n binary matrices of equal size: D for dasher availability and U for user presence. A cell value...

Coding & Algorithms
7
0
72 people solved
Jul 26, 2025
Tesla logo
Tesla
Medium
Software Engineer

Find latency pairs with minimal difference

Given an array of integers representing network latencies, return all increasing pairs [a, b] such that b − a equals the minimal absolute difference b...

Coding & Algorithms
4
0
44 people solved
Jul 26, 2025
Meta logo
Meta
Medium
Software Engineer

Solve increasing sequence and path problems

Solve increasing sequence and path problems Answer the following related tasks about increasing sequences and paths: a) Contiguous subarray: Given an ...

Coding & Algorithms
3
0
28 people solved
Jul 26, 2025
Nash AI logo
Nash AI
Medium
Software Engineer

Implement Minesweeper click and print

Implement Minesweeper click and print Implement the Minesweeper click(row, col) operation and a function to print the board. Rules: ( 1) If the clicke...

Coding & Algorithms
5
0
44 people solved
Jul 26, 2025
Oracle logo
Oracle
Medium
Software Engineer

Determine if robot path is bounded

Determine if robot path is bounded A robot starts at (0, 0) facing North on an infinite grid. It executes a string s consisting of 'G' (move forward 1...

Coding & Algorithms
7
0
70 people solved
Jul 26, 2025
Bloomberg logo
Bloomberg
Medium
Software Engineer

Implement classes in existing abstract hierarchy

You are given an existing Python codebase that defines multiple classes, including abstract base classes using abc.ABC and @abstractmethod decorators....

Coding & Algorithms
7
0
96 people solved
Jul 26, 2025
C3 AI logo
C3 AI
Medium
Data Scientist

Decompress an encoded string

Decompress an encoded string Given an encoded string, return its decoded (decompressed) form. Use the following encoding rule: - A positive integer \(...

Coding & Algorithms
3
0
38 people solved
Jul 25, 2025
Optiver logo
Optiver
Medium
Software Engineer

Validate a Binary Tree Built from Directed Edges

Validate a Binary Tree Built from Directed Edges You are given a list of directed edges. Each edge is a pair (parent, child) of positive-integer node ...

Coding & Algorithms
0
0
6 people solved
Jul 23, 2025
DoorDash logo
DoorDash
Medium
Software EngineerSenior+

Implement a hierarchical key-value store

Implement a hierarchical key-value store Implement an in-memory hierarchical key-value store where keys are UNIX-like paths joined by '/'. The root no...

Coding & Algorithms
7
0
73 people solved
Jul 17, 2025
Meta logo
Meta
Medium
Software Engineer

Solve binary tree, grid, and heap tasks

Solve binary tree, grid, and heap tasks Answer the following independent coding tasks: 1) Range sum in a BST: Given the root of a binary search tree a...

Coding & Algorithms
3
0
31 people solved
Jul 17, 2025
Netflix logo
Netflix
Medium
Software Engineer

Implement topological sort from string input

You receive N lines of raw text describing task dependencies, e.g., 'install A after B', 'C->A', 'B before D'. Implement a function that: ( 1) parses ...

Coding & Algorithms
12
0
155 people solved
Jul 17, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement inventory allocation with backorders

Implement inventory allocation with backorders Design and implement a function to process an event stream for an e-commerce marketplace. Input: ( 1) i...

Coding & Algorithms
1
0
28 people solved
Jul 17, 2025
IXL Learning logo
IXL Learning
Medium
Software Engineer

Identify and prevent code-breaking inputs

Identify and prevent code-breaking inputs Identify inputs and scenarios that could break your implementation and explain how you would prevent them. C...

Coding & Algorithms
5
0
57 people solved
Jul 17, 2025
Optiver logo
Optiver
Medium
Software Engineer

Identify OS component causing process starvation

A system with 2 CPU cores runs 5 identical processes continuously. Four processes get equal CPU time, but the fifth appears to get none. Which part of...

Coding & Algorithms
6
0
93 people solved
Jul 17, 2025
Citadel logo
Citadel
Medium
Software Engineer

Solve two DS&A optimization problems

Problem 1 — Maximize alternating-sum over four array partitions: Given an integer array arr[1..n] (1-based). Choose indices a, b, c with 1 ≤ a ≤ b ≤ c...

Coding & Algorithms
8
0
131 people solved
Jul 16, 2025
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer

Find shortest word transformation with caching

Find shortest word transformation with caching You are given a start word and an end word of equal length, and a dictionary of valid words. In one mov...

Coding & Algorithms
10
0
95 people solved
Jul 16, 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