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
Airbnb logo
Airbnb
Hard
Software Engineer Locked

Find a split-stay booking across listings

This question evaluates understanding of interval coverage and algorithmic problem solving, specifically reasoning about continuous date ranges, split...

Coding & Algorithms
7
0
83 people solved
Jan 22, 2026
Salesforce logo
Salesforce
Medium
Software Engineer

Implement a traffic-light UI with JS

Frontend Coding: Traffic Light Build a simple traffic light component using HTML + CSS + JavaScript. Requirements - Render a vertical traffic light wi...

Coding & Algorithms
11
0
162 people solved
Jan 22, 2026
Coinbase logo
Coinbase
Medium
Data Scientist Locked

Increment Digit Array

This question evaluates a candidate's competency in array manipulation and elementary arithmetic on digit sequences, including carry propagation and h...

Coding & Algorithms
3
0
48 people solved
Jan 21, 2026
Medium
Software Engineer Locked

Return the k-th row of Pascal-like triangle

This question evaluates combinatorics, array manipulation, and space-efficient algorithm design by requiring computation of a specific row of Pascal’s...

Coding & Algorithms
3
0
28 people solved
Jan 21, 2026
Capital One logo
Capital One
Medium
Software EngineerSenior+

Count Numbers With Odd Zeros

Given an array a of non-negative integers, count how many elements contain an odd number of digit '0' in their decimal representation. Notes: - Treat ...

Coding & Algorithms
13
0
106 people solved
Jan 20, 2026
Point72 logo
Point72
Hard
Data Scientist Locked

Implement composition and mixin utilities

This question evaluates functional programming concepts (function composition and variable-argument handling) and object-oriented serialization patter...

Coding & Algorithms
5
0
46 people solved
Jan 20, 2026
Others logo
Others
Medium
Software Engineer Locked

Answer k-step ancestor queries in a rooted tree

This question evaluates proficiency with tree data structures and ancestor-query algorithms, focusing on reasoning about parent arrays, upward travers...

Coding & Algorithms
2
0
27 people solved
Jan 20, 2026
Netflix logo
Netflix
Hard
Software Engineer Locked

Design command executor with undo

This question evaluates understanding of the command pattern, state and history management, failure handling, and appropriate data structure use for i...

Coding & Algorithms
9
0
70 people solved
Jan 20, 2026
Capital One logo
Capital One
Medium
Machine Learning Engineer Locked

Count ordered fragment pairs forming a password

This question evaluates proficiency with string manipulation, handling duplicate fragments, and combinatorial reasoning about ordered index pairs that...

Coding & Algorithms
10
0
70 people solved
Jan 20, 2026
Uber logo
Uber
Hard
Software Engineer Locked

Find robots matching obstacle-distance signature

This question evaluates spatial reasoning on 2D grids, the ability to compute distance signatures to nearest obstacles, and careful handling of bounda...

Coding & Algorithms
10
0
148 people solved
Jan 20, 2026
Two Sigma logo
Two Sigma
Medium
Data ScientistIntern

Linear Interpolator with Extrapolation

Linear Interpolator with Extrapolation You are given n knot points in a 2D coordinate system, where knots[i] = [x_i, y_i]. All x-coordinates are disti...

Coding & Algorithms
8
0
57 people solved
Sep 10, 2025
Natoora logo
Natoora
Medium
Data Analyst Locked

Design a 25,000-CSV ETL pipeline

This question evaluates data engineering and ETL pipeline design skills, specifically competencies in automation, schema validation, type standardizat...

Coding & Algorithms
7
0
59 people solved
Jan 18, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Maximize score in 15-sum card game

This question evaluates algorithmic problem-solving in combinatorial search, state-space optimization, and memoization by asking for the maximum achie...

Coding & Algorithms
9
0
110 people solved
Jan 18, 2026
Shopify logo
Shopify
Easy
Data Engineer Locked

Write SQL for session analytics

This question evaluates SQL proficiency and data engineering competencies, including deduplication, joins, time-series aggregation, rolling-window cal...

Coding & Algorithms
20
0
180 people solved
Jan 17, 2026
Waymo logo
Waymo
Easy
Data Scientist

Determine earliest collision among moving cars

You are given n cars moving over time. Each car has known initial state at time \(t=0\): - 1D case (straight road): - initial position \(x_i\) (mete...

Coding & Algorithms
32
0
244 people solved
Jan 17, 2026
Waymo logo
Waymo
Easy
Data Scientist Locked

Implement nested template string substitution

This question evaluates understanding of string processing, dependency resolution, recursive expansion, cycle detection, and efficiency techniques suc...

Coding & Algorithms
17
1
129 people solved
Jan 17, 2026
TikTok logo
TikTok
Easy
Data Scientist

Maximize watched duration under consecutive-sum limit

You have a list of videos in a feed. Video i has duration d[i] (positive integer). A user has an “attention span” limit A. You want to select a subset...

Coding & Algorithms
7
0
64 people solved
Jan 17, 2026
Boston logo
Boston
Easy
Data Scientist

Implement palindrome check and valid parentheses

You have 20–25 minutes per problem. Implement the following two functions and be prepared to explain your approach and time/space complexity. Problem ...

Coding & Algorithms
6
0
47 people solved
Jan 17, 2026
Bilt Rewards logo
Bilt Rewards
Medium
Software Engineer

Debug and Fix Failing Unit Tests in Java

You receive a small Java project for a credit-card rewards service with three failing unit tests: calculatesTriplePointsForRestaurants, returnsUnknown...

Coding & Algorithms
2
0
29 people solved
Sep 6, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Solve and optimize menu combo DP

Given up to N different menu items, each with a unit price, and a list of combo offers where each offer specifies quantities for some items and a tota...

Coding & Algorithms
5
0
25 people solved
Sep 6, 2025

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