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

Implement topological sort and tree boundary traversal

You are given two separate coding tasks. Problem A — Order courses with prerequisites You have n courses labeled 0..n-1 and a list of prerequisite pai...

Coding & Algorithms
31
0
546 people solved
Feb 12, 2026
Meta logo
Meta
Medium
Software Engineer AI Locked

Solve tree, array, and maze tasks

This set of problems evaluates proficiency in algorithms and data structures, covering binary tree diameter computation, array optimization for maximu...

Coding & Algorithms
2
0
26 people solved
Oct 17, 2025
Snowflake logo
Snowflake
Hard
Software Engineer Locked

Solve scheduling and tree path problems

This set evaluates interval scheduling and constrained optimization for weighted, at-most-K selection, tree structure manipulation and subtree effects...

Coding & Algorithms
22
0
169 people solved
Feb 11, 2026
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Maximize concatenation length with unique chars

This question evaluates understanding of string manipulation, set-based uniqueness constraints, and combinatorial subset selection for maximizing conc...

Coding & Algorithms
3
0
48 people solved
Feb 11, 2026
Stripe logo
Stripe
Medium
Software Engineer Locked

How to find the cheapest flight within K stops

This question evaluates understanding of graph algorithms and constrained shortest-path modeling, focusing on reasoning about weighted directed edges,...

Coding & Algorithms
8
0
77 people solved
Feb 11, 2026
Uber logo
Uber
Medium
Software Engineer

Compute final prices with next smaller discount

You are given an integer array prices of length n, where prices[i] is the original price of the i-th item. For each item i, find the first index j > i...

Coding & Algorithms
6
0
84 people solved
Feb 11, 2026
Citadel logo
Citadel
Easy
Software Engineer Locked

Implement LRU/LFU cache with custom eviction

This question evaluates proficiency in cache design and data-structure implementation, focusing on eviction policies (LRU, LFU), metadata tracking for...

Coding & Algorithms
25
0
239 people solved
Feb 11, 2026
Uber logo
Uber
Medium
Software Engineer

Determine balanced k values in a permutation

You are given a permutation p of the integers 1..n. For a number k (where 1 <= k <= n), call k balanced if there exists a contiguous subarray p[l..r] ...

Coding & Algorithms
33
0
272 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Find minimum moves to solve the 15-puzzle

This question evaluates understanding of state-space search, heuristic reasoning, and solvability analysis for combinatorial sliding puzzles, testing ...

Coding & Algorithms
2
0
41 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Implement idempotent request handling with idempotency keys

This question evaluates understanding of idempotency semantics, idempotency-key handling, concurrency control, synchronization, and in-memory TTL-base...

Coding & Algorithms
5
0
44 people solved
Feb 11, 2026
Citadel logo
Citadel
Medium
Software EngineerIntern

Implement task queue with insert, delete, execute

Problem: Task manager with insert/delete/execute-next Design a data structure to manage executable tasks. Each task has: - taskId (unique) - priority ...

Coding & Algorithms
30
0
216 people solved
Feb 11, 2026
Citadel logo
Citadel
Medium
Software EngineerIntern

Simulate 2048 and pack board into uint64

Problem: 2048 move simulation + board compression You are implementing part of the 2048 game on a fixed 4×4 grid. Part A — Simulate a move Given a 4×4...

Coding & Algorithms
23
0
286 people solved
Feb 11, 2026
MongoDB logo
MongoDB
Medium
Software Engineer Locked

Design iterator for sorted union

This question evaluates algorithmic thinking and iterator-based streaming skills, focusing on merging strictly increasing inputs and deduplicating res...

Coding & Algorithms
12
0
144 people solved
Feb 11, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Extend a BFS maze solver stepwise

This question evaluates proficiency in grid-based graph traversal and pathfinding, covering BFS mechanics, stateful reachability with keys and doors, ...

Coding & Algorithms
7
0
52 people solved
Feb 11, 2026
Meta logo
Meta
Medium
Software EngineerSenior+ Locked

Solve maze tasks and compute shortest routes

This multi-part question evaluates proficiency in grid-based pathfinding and shortest-path reasoning, debugging and incremental code extension, handli...

Coding & Algorithms
6
0
81 people solved
Feb 11, 2026
Nuro logo
Nuro
Medium
Software Engineer Locked

Group points by distance threshold

This question evaluates understanding of geometric graph construction and connectivity, computational geometry concepts such as Euclidean distance, an...

Coding & Algorithms
5
0
82 people solved
Feb 11, 2026
Molocoads logo
Molocoads
Medium
Software Engineer

Can you visit all rooms and score parentheses?

Problem 1: Visit all locked rooms with keys There are n rooms labeled 0..n-1. All rooms are locked except room 0. - When you enter room i, you find a ...

Coding & Algorithms
7
0
56 people solved
Feb 11, 2026
Salesforce logo
Salesforce
Medium
Software Engineer Locked

Minimize operations to reduce integer to zero

This question evaluates algorithmic problem-solving and integer-manipulation skills, specifically assessing the ability to reason about operation coun...

Coding & Algorithms
10
0
112 people solved
Feb 11, 2026
Apple logo
Apple
Hard
Software Engineer Locked

Count subarrays with sum equals k

This question evaluates a candidate's competency in array algorithms and reasoning about contiguous subarray sums, including correct handling of negat...

Coding & Algorithms
23
0
172 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Answer suffix maximum-frequency queries

This question evaluates algorithm design skills and array-processing competency for answering repeated queries efficiently, focusing on time and space...

Coding & Algorithms
5
0
99 people solved
Feb 11, 2026

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