Coding & Algorithms Interview Questions

Practice 3,429 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.4k Questions 368 Companies08.11.2026
Showing 20 results
Role
Google logo
Google
Medium
Software Engineer

Count Connected Clusters of Two-Dimensional Points

Count Connected Clusters of Two-Dimensional Points Problem Implement count_clusters(points, radius). points is a list of two-dimensional integer coord...

Coding & Algorithms
2
1
31 people solved
Jul 27, 2026
Google logo
Google
Medium
Software Engineer

Determine All Players with Fixed Rankings

Determine All Players with Fixed Rankings There are N players and directed match results. A pair [a, b] means player a defeated player b. Results are ...

Coding & Algorithms
1
0
21 people solved
Aug 1, 2026
OpenAI logo
OpenAI
Medium
Software Engineer

Return the Lexicographically Smallest Topological Order

Return the Lexicographically Smallest Topological Order Problem Implement topologicalOrder(nodeCount, edges) -> order. The directed graph contains nod...

Coding & Algorithms
2
0
20 people solved
Aug 1, 2026
Databricks logo
Databricks
Hard
Software EngineerSenior+

Build a Constant-Time Snapshot Set Iterator

Build a Constant-Time Snapshot Set Iterator Design SnapshotSet, a set of integers whose iterators observe an immutable logical snapshot without copyin...

Coding & Algorithms
7
0
89 people solved
Jul 7, 2026
Plaid logo
Plaid
Medium
Software Engineer

Count Completed Jobs in a Serial Single-Worker Pipeline

Count Completed Jobs in a Serial Single-Worker Pipeline An automation pipeline contains stages that execute in order. Each stage is represented as [nu...

Coding & Algorithms
11
0
93 people solved
Jul 13, 2026
Apple logo
Apple
Medium
Software Engineer

Find the K Closest Pairs in a Sorted Array

Implement k_closest_pairs(nums, k) for a strictly increasing sorted array. Consider every pair of indices (i, j) with i < j. Its distance is nums[j] -...

Coding & Algorithms
0
1
9 people solved
Aug 9, 2026
Pinterest logo
Pinterest
Hard
Software Engineer

Maintain an Escape-Room Leaderboard

Design and implement an EscapeRoomGame for a fixed set of players and rooms 0 through R. - advance(player_id) moves that player forward by one room in...

Coding & Algorithms
1
0
15 people solved
Aug 2, 2026
Apple logo
Apple
Medium
Software Engineer

Determine Whether an Undirected Graph Is Two-Colorable

Determine Whether an Undirected Graph Is Two-Colorable Given an undirected graph with nodes labeled 0 through n - 1, determine whether every node can ...

Coding & Algorithms
9
0
90 people solved
Jul 13, 2026
Applied logo
Applied
Hard
Backend Engineer

Resolve Dependent Addition Equations

Resolve Dependent Addition Equations Problem Implement resolveEquations(equations) -> output. Each input string defines one variable as a sum of nonne...

Coding & Algorithms
0
0
12 people solved
Aug 4, 2026
Upstart logo
Upstart
Medium
Software Engineer

Count Words in Lexicographic Order

Count Words in Lexicographic Order Implement word_counts(words) for a list of lowercase words. Return a list of (word, count) pairs sorted in ascendin...

Coding & Algorithms
3
0
30 people solved
Jul 27, 2026
Amazon logo
Amazon
Medium
Software EngineerSenior+

Implement Multi-Player Tic-Tac-Toe

Implement Multi-Player Tic-Tac-Toe Implement a game class for an N by N board and K players. Each player has a distinct one-character printable mark. ...

Coding & Algorithms
4
0
49 people solved
Jul 17, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Simulate Constant-Time Random Courier Selection

Simulate Constant-Time Random Courier Selection Problem Implement simulate_random_picker(operations, random_values). The picker maintains a changing s...

Coding & Algorithms
2
0
11 people solved
Aug 4, 2026
Upstart logo
Upstart
Medium
Software Engineer

Add Dramatic Punctuation to Text

Add Dramatic Punctuation to Text Implement add_drama(text). Preserve all whitespace exactly. For each maximal non-whitespace token, first replace ever...

Coding & Algorithms
3
0
28 people solved
Jul 27, 2026
Microsoft logo
Microsoft
Medium
Software Engineer

Minimize Fuel Cost Across Cities

Minimize Fuel Cost Across Cities Problem Hackerland has g_nodes cities numbered from 1 through g_nodes and bidirectional roads. Road i connects g_from...

Coding & Algorithms
0
0
11 people solved
Aug 3, 2026
Applied logo
Applied
Medium
Software Engineer

Evaluate Dependent Variable Assignments

Evaluate Dependent Variable Assignments Problem Implement evaluate_assignments(expressions). Each input string assigns one variable to a sum of intege...

Coding & Algorithms
0
0
11 people solved
Aug 3, 2026
Medium
Software EngineerNew Grad

Count Grid Paths Without Three Consecutive Moves

Count Paths Without Three Consecutive Moves A frog starts at (0, 0) and must reach (right_steps, up_steps). Every move is exactly one unit right (R) o...

Coding & Algorithms
2
0
23 people solved
Jul 28, 2026
Google logo
Google
Medium
Software EngineerNew Grad Locked

Search a Pattern Across the Leaf Text of a Binary Tree

Search for a pattern across the left-to-right concatenation of binary-tree leaf strings, including matches that cross leaf boundaries. This algorithm ...

Coding & Algorithms
19
1
159 people solved
Jun 17, 2026
Nuro logo
Nuro
Medium
Software Engineer

Maximize Revenue With Two Contiguous Delivery Routes

Problem Houses lie in a line. values[i] is the nonnegative payment for delivering to house i. Two delivery robots are available. Robot one can serve a...

Coding & Algorithms
2
0
27 people solved
Jul 24, 2026
Together logo
Together
Medium
Software Engineer

Schedule GPU Pods and Drain a Node

Problem Implement schedule_gpu_nodes(nodes, request_gpus, delete_name). Each node is {name, gpus, running_pods} and each pod is {name, required_gpus}....

Coding & Algorithms
3
0
44 people solved
Jul 13, 2026
Capital One logo
Capital One
Medium
Software Engineer

Sort Every Concentric Matrix Border Clockwise

Sort Every Concentric Matrix Border Clockwise Given a nonempty rectangular integer matrix, process each concentric layer independently. For a layer, l...

Coding & Algorithms
7
0
64 people solved
Jul 21, 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