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
Robinhood logo
Robinhood
Medium
Software EngineerSenior+ Locked

Design a constrained cache and secure string validator

This question evaluates proficiency in data structures and algorithms (constrained cache design), concurrent programming, complexity analysis, and sec...

Coding & Algorithms
5
0
99 people solved
Jan 22, 2026
Databricks logo
Databricks
Hard
Software EngineerNew Grad Locked

Optimize a SQL query plan tree

This question evaluates understanding of relational algebra, query optimization techniques, and tree-based plan transformations such as predicate push...

Coding & Algorithms
7
0
65 people solved
Jan 22, 2026
Shopify logo
Shopify
Easy
Machine Learning Engineer Locked

Implement an LRU Cache

This question evaluates a candidate's competency in designing efficient cache mechanisms and managing time and space complexity for operations require...

Coding & Algorithms
16
0
165 people solved
Jan 22, 2026
Tesla logo
Tesla
Hard
Software Engineer Locked

Coordinate workers across two exclusive targets

This question evaluates proficiency in concurrent programming and synchronization, focusing on safe resource coordination, mutual exclusion, utilizati...

Coding & Algorithms
8
0
114 people solved
Jan 22, 2026
Citadel logo
Citadel
Medium
Software Engineer Locked

Merge K timestamped lists with timestamp coalescing

This question evaluates algorithmic skills in merging multiple sorted sequences, coalescing records by key (timestamp), merging sorted value arrays, a...

Coding & Algorithms
21
0
148 people solved
Jan 22, 2026
Snowflake logo
Snowflake
Hard
Software Engineer Locked

Solve four OA algorithm problems

This multi-part exercise evaluates algorithmic problem-solving across combinatorics and geometry (counting axis-aligned square subgrids), string reord...

Coding & Algorithms
8
0
105 people solved
Jan 22, 2026
Google logo
Google
Hard
Software Engineer Locked

Compute minimax grid path and network delay

This question evaluates algorithmic problem-solving in shortest-path and path-optimization contexts, specifically minimax pathfinding on a grid and si...

Coding & Algorithms
20
0
238 people solved
Jan 22, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer Locked

Count islands by requested sizes

This question evaluates a candidate's understanding of grid connectivity, identification of connected components, and the ability to aggregate compone...

Coding & Algorithms
22
0
159 people solved
Jan 22, 2026
PayPal logo
PayPal
Medium
Software Engineer

Contrast TCP vs UDP; detect loss

Contrast TCP vs UDP; detect loss Contrast TCP and UDP in reliability, ordering, congestion control, connection setup, and overhead. How does TCP detec...

Coding & Algorithms
6
0
55 people solved
Aug 7, 2025
Rippling logo
Rippling
Medium
Software Engineer AI

Compare Complete or Partial Hands

Implement a hand comparison engine for a simplified poker-like card game. Each player has a hand represented by an array of card strings. A card is en...

Coding & Algorithms
8
0
79 people solved
Mar 14, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Solve tree distance and design file system

Solve tree distance and design file system Given a binary tree, find the maximum distance between two 'alive' nodes, where 'alive' nodes are initially...

Coding & Algorithms
5
0
61 people solved
Aug 4, 2025
Gofundme logo
Gofundme
Easy
Software Engineer Locked

Validate a bracket string

This question evaluates a candidate's ability to reason about paired-token matching and nested structure correctness in strings, measuring skills in p...

Coding & Algorithms
2
0
26 people solved
Jan 19, 2026
Databricks logo
Databricks
Medium
Software Engineer Locked

Partition a Target String by Source Substrings

This question evaluates understanding of string algorithms and optimal partitioning, specifically substring matching and minimizing the number of cont...

Coding & Algorithms
3
0
19 people solved
May 14, 2026
Uber logo
Uber
Medium
Software Engineer

Enforce ordered execution across threads

Enforce ordered execution across threads Implement a class with three methods alpha(), beta(), and gamma() that may be called by three different threa...

Coding & Algorithms
8
0
82 people solved
Aug 1, 2025
TikTok logo
TikTok
Medium
Machine Learning Engineer

Find and count target-sum subarrays

Find and count target-sum subarrays Given an integer array nums and an integer target, implement: ( 1) a function that returns true if any non-empty c...

Coding & Algorithms
6
0
55 people solved
Jul 31, 2025
Others logo
Others
Easy
Data Scientist

Return the largest file size in a directory

Problem (Bash / File System) Implement a Bash function (or shell snippet) that returns the maximum file size (in bytes) under a given directory. Requi...

Coding & Algorithms
8
0
98 people solved
Jan 17, 2026
Google logo
Google
Medium
Software Engineer

Check if all substrings are dictionary words

You are given a string s (letters only) and access to an English dictionary dict (a set of valid words). Return true if every contiguous substring of ...

Coding & Algorithms
33
0
319 people solved
Mar 11, 2026
Replit logo
Replit
Easy
Software Engineer

Compress editor keystrokes into insert/delete/skip

You are implementing a simplified collaborative editor sync format. You are given: - An initial document string doc. - A list of user input operations...

Coding & Algorithms
8
0
69 people solved
Mar 11, 2026
ZipHQ logo
ZipHQ
Hard
Software Engineer

Find shortest path on infinite grid

You are given an infinite 2D grid with integer coordinates. From a cell (x, y) you may move in 4 directions (North/South/East/West) by 1 cell per move...

Coding & Algorithms
51
0
408 people solved
Mar 11, 2026
Waymo logo
Waymo
Medium
Software Engineer

Find the Best Meeting Point on a Grid

Find the Best Meeting Point on a Grid You are given a rectangular grid containing buildings, empty land, and obstacles: - 1 is a building. - 0 is empt...

Coding & Algorithms
3
0
19 people solved
May 13, 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