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

Implement a CSV dataset join

Implement joinDataSet(fieldName, customerFile, processorFile, skipUnmatched). You are given two datasets represented as List<String>, where: - custome...

Coding & Algorithms
9
0
94 people solved
Jan 14, 2026
NVIDIA logo
NVIDIA
Medium
Software Engineer Locked

Find minimum time to cross bridge with flashlight

This question evaluates algorithmic problem-solving and optimization skills, including modeling constrained state transitions, reasoning about trade-o...

Coding & Algorithms
3
0
49 people solved
Jan 14, 2026
Atlassian logo
Atlassian
Medium
Software Engineer Locked

Find smallest common organization for employees

The question evaluates competency in hierarchical and graph data structures, including tree lowest-common-ancestor reasoning, DAG ancestor minimality,...

Coding & Algorithms
10
0
79 people solved
Jan 14, 2026
Trexquant logo
Trexquant
Medium
Software Engineer

Maintain median of a data stream

Design a data structure that supports: - addNum(int x): Add an integer from a stream. - findMedian(): Return the median of all inserted numbers so far...

Coding & Algorithms
8
0
61 people solved
Sep 1, 2025
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Implement Three Research Coding Tasks

This multi-part question evaluates skills in differentiable linear algebra and automatic differentiation safety, memory- and buffer-aware numerical im...

Coding & Algorithms
5
0
45 people solved
Jan 13, 2026
Optiver logo
Optiver
Medium
Software Engineer Locked

Design a circular queue data structure

This question evaluates understanding of circular buffer data structures and the ability to implement fixed-capacity queue operations with O(1) time a...

Coding & Algorithms
8
0
70 people solved
Jan 13, 2026
Pinterest logo
Pinterest
Hard
Machine Learning EngineerSenior+ Locked

Support room moves and query top-k fastest

This question evaluates understanding of dynamic data structure design and ordering semantics, specifically maintaining per-room FIFO arrival order, c...

Coding & Algorithms
10
0
68 people solved
Jan 12, 2026
Pinterest logo
Pinterest
Hard
Machine Learning EngineerSenior+ Locked

Implement trie-based autocomplete

This question evaluates understanding and implementation of trie data structures for prefix-based retrieval, testing competencies in string algorithms...

Coding & Algorithms
5
0
47 people solved
Jan 12, 2026
Art Advisors logo
Art Advisors
Medium
Software Engineer Locked

Solve common array/graph interview problems

This multi-part question evaluates proficiency in array and matrix manipulation, graph traversal and shortest-path reasoning for word transformations,...

Coding & Algorithms
1
0
24 people solved
Jan 12, 2026
Decagon logo
Decagon
Medium
Software Engineer Locked

Implement CSAT tracking and call timing

This question evaluates skills in designing efficient streaming/rolling-window data structures and stateful updates for real-time metrics, alongside p...

Coding & Algorithms
12
0
133 people solved
Jan 11, 2026
Snapchat logo
Snapchat
Medium
Software Engineer Locked

Find max node-value range across components

This question evaluates understanding of undirected graph connectivity and component-wise aggregation, specifically the ability to identify connected ...

Coding & Algorithms
3
0
41 people solved
Jan 10, 2026
Google logo
Google
Medium
Software Engineer Locked

Compute distance to nearest taxi in grid

This question evaluates understanding of graph traversal and shortest-path reasoning on grids, algorithmic problem-solving for computing distances fro...

Coding & Algorithms
27
0
213 people solved
Jan 10, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Compute infection spread time

This question evaluates understanding of grid-based graph traversal and propagation dynamics, testing competencies in breadth-first search concepts, s...

Coding & Algorithms
9
0
126 people solved
Jan 9, 2026
Citadel logo
Citadel
Medium
Software Engineer Locked

Return nodes on a tree diameter path

This question evaluates understanding of graph algorithms and tree properties, specifically the ability to identify and reconstruct a longest simple p...

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

Design a token manager with lazy expiration

This question evaluates time-based data structure design and algorithmic reasoning for managing expiring items, focusing on hashing, timestamp orderin...

Coding & Algorithms
11
0
92 people solved
Jan 9, 2026
Amazon logo
Amazon
Medium
Software Engineer

Solve Two OA Algorithm Problems

The post describes two separate coding questions from an online assessment: 1. Greedy deletion by minimum value Given an integer array nums, repeate...

Coding & Algorithms
14
0
172 people solved
Jan 8, 2026
Applied logo
Applied
Medium
Software Engineer Locked

Parse a protobuf-like schema and answer queries

This question evaluates proficiency in parsing grammar-like schemas, scope-based name resolution for nested types, symbol-table construction, and desi...

Coding & Algorithms
2
0
23 people solved
Jan 8, 2026
Uber logo
Uber
Hard
Software Engineer Locked

Solve jump maximization and palindromic path queries

This pair of problems evaluates algorithmic problem-solving skills: the first assesses array-based path optimization and stateful score maximization u...

Coding & Algorithms
9
0
86 people solved
Jan 8, 2026
SoFi logo
SoFi
Easy
Software Engineer Locked

Find maximum-occurring character in a string

This question evaluates proficiency in string manipulation and frequency counting, including correct handling of tie-breaking by earliest first occurr...

Coding & Algorithms
5
0
69 people solved
Jan 7, 2026
Databricks logo
Databricks
Hard
Software Engineer Locked

Convert an IP range to minimal CIDRs

This question evaluates understanding of IPv4 address encoding, binary and bitwise operations, and optimal interval covering for expressing consecutiv...

Coding & Algorithms
6
0
48 people solved
Jan 7, 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