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
Tesla logo
Tesla
Medium
Backend EngineerSenior+

Compute time to burn tree

Given the root of a binary tree and the value of a target node that starts burning at time 0, fire spreads every minute from a burning node to its lef...

Coding & Algorithms
6
0
45 people solved
Jan 25, 2026
Interactive logo
Interactive
Medium
Data Engineer

Compute Minimum Production Days

Question You are given a list of product IDs products, where products[i] is the type of the product that must be produced at step i, and a non-negativ...

Coding & Algorithms
6
0
58 people solved
Jan 25, 2026
Whatnot logo
Whatnot
Medium
Software Engineer

Build a Tic-Tac-Toe App

Implement a simple Tic-Tac-Toe mobile app that can be completed in a 45-minute coding interview. Requirements: - Display a 3x3 board. - Support two lo...

Coding & Algorithms
0
0
10 people solved
Jan 24, 2026
Virtu logo
Virtu
Medium
Data Scientist

Implement Connect Four Winner Detection

Implement a Connect Four-style game engine. The board has 6 rows and 7 columns. Two players alternate turns. On each turn, the current player chooses ...

Coding & Algorithms
3
0
23 people solved
Jan 22, 2026
Bytedance logo
Bytedance
Medium
Site Reliability Engineer Locked

Generate combinations and permutations

This question evaluates a candidate's ability to implement combinatorial generation of combinations and permutations using distinct elements, testing ...

Coding & Algorithms
2
0
29 people solved
Jan 22, 2026
TikTok logo
TikTok
Medium
Machine Learning Engineer Locked

Find length of longest common subsequence

This question evaluates understanding of dynamic programming, string algorithms, and algorithmic problem-solving skills related to sequence comparison...

Coding & Algorithms
5
0
45 people solved
Jan 22, 2026
MathWorks logo
MathWorks
Medium
Software EngineerIntern Locked

Maximize minimum value after k decrements

This question evaluates array-based optimization skills, resource-allocation reasoning under a fixed decrement budget, and algorithmic complexity anal...

Coding & Algorithms
1
0
31 people solved
Jan 22, 2026
Meta logo
Meta
Medium
Machine Learning EngineerSenior+ Locked

Find two numbers summing to target without hashmap

This question evaluates array manipulation, index-tracking, and algorithmic problem-solving skills, with emphasis on time and space complexity trade-o...

Coding & Algorithms
4
0
73 people solved
Jan 22, 2026
Instacart logo
Instacart
Hard
Software Engineer Locked

Decode a password string into letters

This question evaluates string parsing and encoding/decoding skills, specifically mapping numeric tokens and handling delimiter characters within the ...

Coding & Algorithms
15
0
137 people solved
Jan 22, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Find when failures started in log stream

This question evaluates understanding of monotonic sequences and search algorithms (such as binary search), along with algorithmic reasoning about cor...

Coding & Algorithms
4
0
88 people solved
Jan 22, 2026
Robinhood logo
Robinhood
Medium
Software Engineer Locked

Compute nearest gate distance in grid

This question evaluates grid traversal, distance propagation, obstacle handling, and in-place matrix update competencies within the Coding & Algorithm...

Coding & Algorithms
13
0
141 people solved
Jan 22, 2026
Amazon logo
Amazon
Hard
Software EngineerSenior+ Locked

Implement array and tree traversal tasks

This question evaluates algorithmic problem-solving and data-structure competency, specifically array-based optimization for single-trade profit and t...

Coding & Algorithms
6
0
80 people solved
Jan 22, 2026
Applied logo
Applied
Medium
Software Engineer Locked

Scale Game of Life to huge matrices

This question evaluates a candidate's ability to design space-efficient, I/O-aware algorithms and streaming or external-memory techniques for processi...

Coding & Algorithms
3
0
38 people solved
Jan 22, 2026
Applied logo
Applied
Medium
Software Engineer Locked

Validate JSON against a protobuf-like schema

This question evaluates schema validation and data-typing skills, including understanding of JSON primitive types, recursive message structures, and c...

Coding & Algorithms
1
0
15 people solved
Jan 22, 2026
Salesforce logo
Salesforce
Medium
Software Engineer Locked

Flatten a nested JSON object

This question evaluates the ability to traverse and manipulate nested JSON-like structures, emphasizing concepts such as recursion or iterative traver...

Coding & Algorithms
16
0
118 people solved
Jan 22, 2026
Pinterest logo
Pinterest
Medium
Software Engineer Locked

Compute reachable cells for a cleaning robot

This question evaluates understanding of graph traversal, state-space modeling, and scalability when computing reachable cells on a 2D grid under 8-di...

Coding & Algorithms
38
0
270 people solved
Jan 22, 2026
Dropbox logo
Dropbox
Medium
Software Engineer Locked

Return all files under a path

This question evaluates filesystem traversal and recursive/iterative algorithm skills, including handling different path types, edge cases such as mis...

Coding & Algorithms
6
0
115 people solved
Jan 22, 2026
Pinterest logo
Pinterest
Medium
Machine Learning Engineer Locked

Generate all hyperparameter combinations

This question evaluates competence in combinatorial enumeration and manipulation of data structures for generating hyperparameter configurations, test...

Coding & Algorithms
12
0
117 people solved
Jan 22, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Find earliest time all riders become connected

This question evaluates graph connectivity and dynamic event-processing skills, testing conceptual understanding of connectivity in undirected graphs ...

Coding & Algorithms
47
0
350 people solved
Jan 22, 2026
xAI logo
xAI
Hard
Software Engineer Locked

Find kth element and sliding-window kth in stream

This question evaluates understanding of order statistics and selection in arrays as well as sliding-window stream processing, including maintaining k...

Coding & Algorithms
8
0
128 people solved
Jan 22, 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