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

Implement a parallelized sort

This question evaluates understanding of parallel algorithms, shared-memory concurrency primitives, synchronization, workload partitioning, and perfor...

Coding & Algorithms
5
0
41 people solved
Jan 22, 2026
TikTok logo
TikTok
Medium
Software Engineer Locked

Solve two grid problems (islands + min-cost path)

This pair of problems evaluates grid-based algorithm competencies, specifically connected-component detection and translation-invariant shape recognit...

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

Implement array merge, round-robin scheduler, and trading simulator

This multipart problem evaluates algorithmic problem solving and systems-design competencies including in-place array manipulation, queue-based schedu...

Coding & Algorithms
18
0
193 people solved
Jan 22, 2026
Stripe logo
Stripe
Medium
Software Engineer Locked

Compute balances with transaction fees and rejections

This question evaluates transaction processing, ledger state management, handling of edge cases like insufficient funds and fixed fees, and efficient ...

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

Implement a rate limiter at scale

This question evaluates understanding of algorithmic and system-level design for per-key rate limiting, including data structures, time/space complexi...

Coding & Algorithms
7
0
82 people solved
Jan 22, 2026
Sig logo
Sig
Medium
Data Scientist Locked

Compute bus-on-time and dice-sum probabilities

This question evaluates understanding of probability concepts including a continuous uniform waiting-time model for bus arrivals and discrete outcome ...

Coding & Algorithms
7
0
58 people solved
Jan 22, 2026
Amazon logo
Amazon
Easy
Software EngineerIntern Locked

Print all odd numbers from an integer list

This question evaluates proficiency with array/list manipulation, parity checking, and handling edge cases such as negative values and integers outsid...

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

Merge overlapping intervals

This question evaluates understanding of interval manipulation, array processing, and algorithmic efficiency by requiring reasoning about overlapping ...

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

Design a rating aggregator that returns totals and averages

This question evaluates a candidate's competency in designing and implementing data structures and algorithms for maintaining dynamic aggregates (tota...

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

Check if one string is a subsequence of another

This question evaluates understanding of string algorithms and subsequence detection, focusing on sequence traversal, edge-case handling, and time/spa...

Coding & Algorithms
1
0
33 people solved
Jan 22, 2026
Atlassian logo
Atlassian
Medium
Machine Learning Engineer Locked

Design O(1) cache and moving average

This question evaluates proficiency in data structures and streaming algorithms by combining an O(1) cache design with an eviction policy and a fixed-...

Coding & Algorithms
5
0
63 people solved
Jan 22, 2026
Airtable logo
Airtable
Medium
Software Engineer Locked

Count business days excluding holidays

This question evaluates proficiency in date and calendar arithmetic, handling set-based exclusions (holiday lists), and reasoning about algorithmic ef...

Coding & Algorithms
29
0
334 people solved
Jan 22, 2026
Crowdstrike logo
Crowdstrike
Medium
Software Engineer Locked

Maximize the minimum value along a grid path

This question evaluates a candidate's competence in graph traversal and path-optimization concepts, emphasizing reasoning about path scores and handli...

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

Compute distance-sum from every tree node

This question evaluates understanding of tree and graph algorithms, including computation of pairwise distances and techniques for aggregating path le...

Coding & Algorithms
20
0
145 people solved
Jan 22, 2026
Databricks logo
Databricks
Hard
Software Engineer Locked

Find path between nodes in Fibonacci tree

This question evaluates understanding of recursive tree structures, preorder indexing, implicit tree representations, algorithmic reasoning about node...

Coding & Algorithms
4
0
42 people solved
Jan 22, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist Locked

Return sorted values after quadratic transform

This question evaluates understanding of mathematical transformations and array manipulation, specifically how applying a quadratic function affects t...

Coding & Algorithms
4
0
69 people solved
Jan 22, 2026
Coinbase logo
Coinbase
Medium
Software Engineer

Implement cursor-based query pagination

You are building a small in-memory database that stores rows with the following fields: - id (string, unique) - score (integer) - payload (string) You...

Coding & Algorithms
31
0
222 people solved
Jan 22, 2026
J.P. Morgan logo
J.P. Morgan
Easy
Software Engineer Locked

Design an autocomplete suggestions API

This question evaluates understanding of string-oriented data structures (e.g., prefix trees/tries), ranked retrieval and dynamic updates, testing ski...

Coding & Algorithms
7
0
66 people solved
Jan 22, 2026
Netflix logo
Netflix
Medium
Software Engineer Locked

Find longest run of identical consecutive shows

This question evaluates array-manipulation skills and the ability to identify contiguous runs of equal values, emphasizing algorithmic efficiency and ...

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

Maximize sum with no adjacent tree nodes

This question evaluates understanding of tree-based dynamic programming and stateful optimization for selecting non-adjacent nodes, testing algorithmi...

Coding & Algorithms
12
0
91 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