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 Locked

Compute effective permissions on DAG and prune tree

This set of problems evaluates proficiency in graph and tree algorithms, specifically transitive state propagation and conflict resolution on a DAG (e...

Coding & Algorithms
22
0
224 people solved
Feb 12, 2026
Databricks logo
Databricks
Hard
Software Engineer Locked

Minimize run-length encoded length with deletions

This question evaluates proficiency in string manipulation, run-length encoding concepts, and dynamic programming-based optimization under deletion co...

Coding & Algorithms
29
0
502 people solved
Feb 12, 2026
eBay logo
eBay
Medium
Software Engineer Locked

Implement bitmap-based block allocator

The bitmap-based block allocator evaluates understanding of data structures, contiguous allocation algorithms, and low-level state management; it is c...

Coding & Algorithms
7
0
58 people solved
Feb 12, 2026
SoFi logo
SoFi
Medium
Software Engineer Locked

Format words into wrapped/justified lines

This question evaluates practical programming skills in string processing, greedy packing, and careful handling of spacing and edge cases, and falls u...

Coding & Algorithms
20
1
214 people solved
Feb 12, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Compute total revenue from greedy VM rentals

This question evaluates understanding of greedy allocation strategies and the ability to maintain dynamic summaries (tracking current maximum and smal...

Coding & Algorithms
23
0
307 people solved
Feb 12, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Implement four data-structure/string geometry tasks

This multi-part question evaluates manual big-integer string multiplication, robust parsing and tokenization of complex log formats, computational geo...

Coding & Algorithms
4
0
59 people solved
Feb 12, 2026
Google logo
Google
Medium
Software Engineer Locked

Compute minimum servers for cyclic tasks

This question evaluates understanding of interval scheduling, overlap detection, and handling cyclic time via modular arithmetic for tasks that wrap p...

Coding & Algorithms
20
1
192 people solved
Feb 12, 2026
Tesla logo
Tesla
Hard
Machine Learning Engineer

Compute suffix sums over waypoints

Problem You are given a batch of 2D waypoint trajectories. - Input: points with shape [B, N, 2], where points[b][i] = (x, y) is the i-th waypoint for ...

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

Extend BFS maze solver with keys and arrows

This question evaluates mastery of breadth-first search, state-space modeling for grid-based traversal, and handling augmented states like keys and on...

Coding & Algorithms
21
0
156 people solved
Feb 12, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer Locked

Solve common string/tree/grid interview tasks

This problem set evaluates practical coding competencies including string parsing and sign handling, positional and frequency-based matching for feedb...

Coding & Algorithms
10
0
78 people solved
Feb 12, 2026
Rubrik logo
Rubrik
Hard
Software Engineer

Validate BFS order queries on a tree

You are given an undirected tree described by two equal-length arrays u and v (each of length n-1). For every index i, there is an undirected edge bet...

Coding & Algorithms
9
0
80 people solved
Feb 12, 2026
Intersystems logo
Intersystems
Medium
Software Engineer Locked

Predict output when iterating ordered keys

This question evaluates understanding of ordered maps, iteration semantics, reverse traversal and accumulation of values in code. It is commonly asked...

Coding & Algorithms
6
0
51 people solved
Feb 12, 2026
Intersystems logo
Intersystems
Medium
Software Engineer Locked

Measure 45 minutes with two ropes

This question evaluates logical and analytical reasoning about non-uniform processes, constraint-based problem solving, and temporal estimation skills...

Coding & Algorithms
3
0
35 people solved
Feb 12, 2026
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Implement weighted random sampling with preprocessing

This question evaluates algorithm design and probabilistic reasoning for weighted random sampling, including data-structure preprocessing, time-space ...

Coding & Algorithms
7
0
90 people solved
Feb 12, 2026
Crusoe logo
Crusoe
Medium
Software Engineer Locked

Calculate charge with a single price override

This question evaluates understanding of interval arithmetic, overlap detection and aggregation for time-based billing, plus careful edge-case handlin...

Coding & Algorithms
22
0
199 people solved
Feb 12, 2026
Google logo
Google
Medium
Software Engineer Locked

Min boards to cover roof holes

This question evaluates competency in combinatorial optimization and problem modeling for coverage constraints, testing algorithmic reasoning, complex...

Coding & Algorithms
16
1
161 people solved
Feb 12, 2026
Waymo logo
Waymo
Medium
Software Engineer Locked

Implement Fibonacci generator, balanced BST, frozenset

This question evaluates proficiency in core data structures and algorithms with a focus on Python-specific features, testing generator semantics (yiel...

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

Implement a debounce function

This question evaluates a candidate's ability to implement a debounce utility using runtime features such as closures, timers, and function-context pr...

Coding & Algorithms
13
0
130 people solved
Feb 12, 2026
Apple logo
Apple
Medium
Software Engineer Locked

Merge overlapping time intervals

This question evaluates competence in interval and array manipulation, sorting-based algorithm design, overlap detection, and efficient time/space com...

Coding & Algorithms
15
1
132 people solved
Feb 12, 2026
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

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