Coding & Algorithms Interview Questions

Practice 3,469 real coding and algorithms interview questions reported from interviews at Meta, Amazon, Google, Uber and Microsoft. The mix follows what these loops actually ask: arrays and strings, hash maps, two pointers and sliding windows, binary search, linked lists, trees and graphs, BFS and DFS, recursion and backtracking, dynamic programming, heaps and priority queues, and the occasional design-a-data-structure round. Roughly four in five are rated medium, which is where most technical screens sit; 477 are hard and cluster in onsite loops. 3,033 of them open in a console where you can run your solution against the test cases in Python, Java, C++ or JavaScript. 2,712 come from Software Engineer interviews, with the rest from Machine Learning Engineer, Data Scientist and Data Engineer loops, and 404 were set as take-home projects rather than live sessions.

3.5k Questions 368 Companies08.11.2026
Showing 20 results
Role
J.P. Morgan logo
J.P. Morgan
Medium
Software Engineer Locked

Solve scheduling and collision problems

This question evaluates a candidate's understanding of algorithm design and data structures for resource allocation and dynamic interaction problems, ...

Coding & Algorithms
5
0
47 people solved
Jan 29, 2026
Instacart logo
Instacart
Hard
Software EngineerSenior+ Locked

Implement store, evaluator, and parser

This question evaluates implementation skills in data structures and algorithms, covering time-based versioning and TTL in an in-memory key-value stor...

Coding & Algorithms
11
0
99 people solved
Jan 29, 2026
Meta logo
Meta
Easy
Software Engineer Locked

Compute Sliding Window Averages

This question evaluates proficiency in array manipulation, sliding-window techniques, and algorithmic efficiency including time and space complexity. ...

Coding & Algorithms
1
0
20 people solved
Jan 29, 2026
Uber logo
Uber
Medium
Software Engineer

Return a Package Build Order

You are given an API: `python get_dependencies(package) -> list[str] ` It returns the direct dependencies of a given package. If package A depends on ...

Coding & Algorithms
4
0
59 people solved
Jan 28, 2026
Confluent logo
Confluent
Medium
Software Engineer Locked

Implement File Tail and Sensor Health

This question evaluates skills in large-file streaming and buffer/pointer manipulation for tailing files, along with data-structure and time-window re...

Coding & Algorithms
9
0
79 people solved
Jan 28, 2026
Pinterest logo
Pinterest
Medium
Software Engineer Locked

Solve Two Grid Search Problems

This question evaluates proficiency in graph traversal on grids, specifically competencies in identifying connected components and modeling propagatio...

Coding & Algorithms
11
0
77 people solved
Jan 28, 2026
DoorDash logo
DoorDash
Easy
Software Engineer

Implement a consistent hashing ring

Implement a class ConsistentHashRing that distributes keys across servers using a hash ring with virtual nodes. Required API: - ConsistentHashRing(rep...

Coding & Algorithms
17
0
172 people solved
Jan 28, 2026
eBay logo
eBay
Medium
Software Engineer

Count Connected Land Regions

You are given an m x n 2D grid representing a map. Each cell is either land ('1') or water ('0'). A land region is formed by connecting adjacent land ...

Coding & Algorithms
2
0
13 people solved
Jan 27, 2026
Bytedance logo
Bytedance
Hard
Site Reliability Engineer

Determine whether squares can fit

You are given an m x n rectangular grid and an array squares, where each value represents the side length of a square that must be cut from the origin...

Coding & Algorithms
3
0
55 people solved
Jan 27, 2026
StackAdapt logo
StackAdapt
Easy
Software Engineer

Design a time-windowed key-value store

Implement a time-windowed key-value store ("Windowed Map") that receives key/value updates at irregular times and only keeps entries from the most rec...

Coding & Algorithms
8
0
106 people solved
Mar 4, 2025
Google logo
Google
Easy
Software Engineer AI Locked

Find Feature Activation Order

This question evaluates graph-algorithms and dependency-resolution skills, including reasoning about prerequisite relationships, ordering constraints,...

Coding & Algorithms
9
0
62 people solved
Jan 26, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Design a Versioned Key-Value Store

This question evaluates understanding of time-versioned data structures, temporal indexing, and efficient lookup strategies for storing and retrieving...

Coding & Algorithms
2
0
36 people solved
Jan 26, 2026
Meta logo
Meta
Easy
Software Engineer Locked

Solve four OA coding problems

This set of four problems evaluates core algorithmic competencies including array manipulation and counting in sorted arrays, resource-constrained opt...

Coding & Algorithms
2
0
50 people solved
Jan 26, 2026
F5Networks logo
F5Networks
Medium
Software EngineerIntern

Find Top Hashtags

You are given two arrays of length n: - tweets[i]: the content of the i-th tweet as a string - timestamps[i]: the publish time of the i-th tweet as an...

Coding & Algorithms
1
0
18 people solved
Jan 25, 2026
Dropbox logo
Dropbox
Medium
Software Engineer

Compute worst-case guesses for adaptive hangman

You are given a set of distinct lowercase words, all of the same length. A hidden word is chosen from this set, but the host is adversarial: after eac...

Coding & Algorithms
6
0
71 people solved
Jan 25, 2026
Capital One logo
Capital One
Medium
Software Engineer

Apply commands to transform a matrix

You are given an integer matrix A of size n × m and a list of string commands to apply in order. Implement the commands and return the final matrix. C...

Coding & Algorithms
13
0
90 people solved
Sep 19, 2025
Tesla logo
Tesla
Medium
Software Engineer

Implement a Timed Task Scheduler

Implement a runnable task scheduler. The scheduler should allow clients to add new tasks at any time. Each task has: - A callback or function to execu...

Coding & Algorithms
0
0
7 people solved
Jan 24, 2026
Medium
Backend Engineer

Compare Strings With Deletions

You are given two strings s and t. Each string may contain lowercase letters and the special character #. A # deletes the closest non-deleted characte...

Coding & Algorithms
1
0
23 people solved
Jan 23, 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
2
0
32 people solved
Jan 22, 2026
Instacart logo
Instacart
Hard
Software Engineer Locked

Evaluate query ratios from equations

This question evaluates a candidate's skill in modeling variable ratios as relational structures, reasoning about transitive numeric relationships, an...

Coding & Algorithms
10
0
119 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