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

Find max word letter span

Implement a function that, given an input text string, computes the maximum word letter span and returns both (a) the maximum span and (b) the list of...

Coding & Algorithms
22
0
203 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Find next and closest palindromes

Given a non-negative integer represented as a string n (no leading zeros unless n == "0"), return the smallest palindromic integer strictly greater th...

Coding & Algorithms
6
0
66 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Find shortest path and compare BFS vs DFS

Given an unweighted graph (directed or undirected), explain how to find the shortest path between two nodes without writing code. Describe the algorit...

Coding & Algorithms
5
0
50 people solved
Sep 6, 2025
Apple logo
Apple
Medium
Software Engineer

Compute minimum required meeting rooms

Given a list of meeting time intervals [start, end) for many events, determine the minimum number of rooms required so no meetings overlap in the same...

Coding & Algorithms
6
0
62 people solved
Sep 6, 2025
Disney logo
Disney
Medium
Software Engineer

Solve grid shortest path with BFS

Given a 2D grid containing 0s (open cells) and 1s (walls), and coordinates for a start (sr, sc) and a target (tr, tc), return the length of the shorte...

Coding & Algorithms
5
0
51 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Implement binary tree in-order traversal

Given the root of a binary tree, return the in-order ordering of its node values. Implement both a recursive solution and an iterative solution using ...

Coding & Algorithms
5
0
40 people solved
Sep 6, 2025
Snapchat logo
Snapchat
Medium
Machine Learning Engineer

Determine and print expression to reach target

You are given four numbers and a target T (e.g., 24). Using +, −, ×, ÷ and parentheses, and using each number exactly once, determine whether you can ...

Coding & Algorithms
4
0
43 people solved
Sep 6, 2025
Citadel logo
Citadel
Medium
Software Engineer

Find earliest common meeting slot

Given K participants' calendars, each a list of busy intervals [start, end) within a working window [workStart, workEnd], and a meeting duration d min...

Coding & Algorithms
22
0
175 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Implement file deduplication at scale

Write a program to deduplicate files in a very large directory tree. Identify groups of identical files without loading entire files into memory. Outl...

Coding & Algorithms
99
0
759 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Debug using logs and allocate tasks

You inherit a service where unit tests pass locally, but production logs show intermittent errors. Without a debugger, outline a step-by-step debuggin...

Coding & Algorithms
18
0
199 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Design dynamic connectivity with alive nodes

Design a data structure to maintain an undirected graph of N nodes, where each node has a boolean 'alive' flag. Support the following operations effic...

Coding & Algorithms
7
0
110 people solved
Sep 6, 2025
Credit Genie logo
Credit Genie
Medium
Software Engineer

Implement and analyze number-pattern function

Implement a function print_number_lines(n) that prints n lines, where the i-th line contains the integers from 1 to i separated by spaces (e.g., n=3 p...

Coding & Algorithms
11
0
148 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find minimum time for irrecoverable password

A password is a string s of length n. A virus attacks positions in a 1-indexed order given by a permutation attackOrder[1..n]. At second t (1 <= t <= ...

Coding & Algorithms
1
0
23 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Maximize credits with limited skips

You are given n warehouses with inventories inventory[0..n-1], and two dispatch amounts: you dispatch dispatch1 units first each turn, then your co-wo...

Coding & Algorithms
2
0
27 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Implement and compare round-robin and consistent hashing

Implement a round-robin load balancer that selects among service nodes, skipping unavailable nodes and wrapping around correctly. Fix typical pitfalls...

Coding & Algorithms
11
0
178 people solved
Sep 6, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Design mutable sum-tree with fast queries

You're given a rooted, mutable tree. Each leaf node stores an integer value. Each internal node's value equals the sum of its immediate children's val...

Coding & Algorithms
21
0
183 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Find leftmost point of maximum brightness

You are given an array of lights, where each light is [p, r] representing a lamp centered at coordinate p on the real number line with radius r, illum...

Coding & Algorithms
2
0
45 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Design and implement a Python solution

Design and implement a solution in Python for a problem specified by the interviewer. Outline your approach and chosen data structures, justify key de...

Coding & Algorithms
26
0
243 people solved
Sep 6, 2025
Akuna Capital logo
Akuna Capital
Medium
Software Engineer

Compute min operations to transform integers

Given integers A and B, transform A into B using the minimum number of operations. Allowed operations: ( 1) subtract 1 from the current value; ( 2) mu...

Coding & Algorithms
3
0
51 people solved
Sep 6, 2025
Walmart Labs logo
Walmart Labs
Medium
Software Engineer

Compute maximum simultaneous bus routes

You are given N bus routes, each defined by a start time (inclusive) and an end time (exclusive). Compute the maximum number of routes running simulta...

Coding & Algorithms
5
1
35 people solved
Sep 6, 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