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

Design a voting counter for restaurants

This question evaluates familiarity with hash-table–based counting, efficient update and lookup operations, handling of ties with a deterministic tie-...

Coding & Algorithms
4
0
33 people solved
Feb 2, 2026
Pinterest logo
Pinterest
Easy
Data Scientist Locked

Implement np.random.choice

This question evaluates understanding of random sampling algorithms, probability distributions (uniform and weighted), handling of weights and edge-ca...

Coding & Algorithms
5
0
47 people solved
Feb 1, 2026
Google logo
Google
Easy
Data Scientist Locked

Implement sampling, subarray scan, and percentile estimate

This multi-part problem evaluates skills in random sampling and geometric probability for uniform 2D sampling, algorithmic array processing for findin...

Coding & Algorithms
8
1
84 people solved
Feb 1, 2026
OpenAI logo
OpenAI
Medium
Machine Learning Engineer Locked

Find the First Working Version

This question evaluates understanding of search algorithms, version normalization, and monotonic predicates, along with competency in parsing and orde...

Coding & Algorithms
3
0
20 people solved
Feb 1, 2026
Stripe logo
Stripe
Medium
Software Engineer Locked

Implement a Datacenter Request Router

This question evaluates command parsing, stateful data structure management, input validation, geospatial computation using the Haversine formula, det...

Coding & Algorithms
4
0
31 people solved
Feb 1, 2026
Sap logo
Sap
Medium
Software Engineer Locked

Implement JavaScript utility and API functions

This question evaluates JavaScript fundamentals including string and numeric operations, array transformation and grouping, functional concepts such a...

Coding & Algorithms
2
0
30 people solved
Feb 1, 2026
Snapchat logo
Snapchat
Medium
Software Engineer Locked

Implement a recent-use eviction cache

This question evaluates a candidate's ability to design and implement a fixed-capacity key-value cache with a recent-use eviction policy, emphasizing ...

Coding & Algorithms
1
0
28 people solved
Sep 29, 2025
Waymo logo
Waymo
Hard
Machine Learning Engineer

Generate Instructions for a Blind Maze Robot

You are given a known 2D maze grid with m rows and n columns. Each cell is one of: - #: wall - .: empty cell - E: the exit, which appears exactly once...

Coding & Algorithms
1
0
10 people solved
Jan 31, 2026
IBM logo
IBM
Medium
Software Engineer

Maximize palindromic strings after character swaps

You are given an integer n and an array of n lowercase strings arr. Operation (can be performed any number of times): choose two different strings arr...

Coding & Algorithms
6
0
71 people solved
Jan 31, 2026
Uber logo
Uber
Medium
Software Engineer

Solve Prime Jumps and Pipeline Scaling

An online assessment contains two independent coding problems. Solve both. Problem 1: Prime-Constrained Score Jump You are given an integer array scor...

Coding & Algorithms
4
0
44 people solved
Jan 30, 2026
Nuro logo
Nuro
Hard
Machine Learning Engineer

Find Maximum Path Sum in N-ary Tree

You are given the root of an N-ary tree. Each node contains an integer value and a list of zero or more children. A path is a sequence of nodes where ...

Coding & Algorithms
2
0
34 people solved
Jan 30, 2026
Coursera logo
Coursera
Hard
Backend Engineer

Implement Popular and Ranked Voting

You are given ranked ballots in aggregated form. Each key is an ordered tuple of candidate names representing one voter's preference from highest to l...

Coding & Algorithms
3
0
46 people solved
Jan 30, 2026
Palo logo
Palo
Easy
Software Engineer

Implement three whiteboard coding tasks

The interview report described several coding questions in the same category: 1. Binary search: Given a sorted array of integers and a target value, r...

Coding & Algorithms
2
0
28 people solved
Jan 30, 2026
Uber logo
Uber
Medium
Data Scientist Locked

Move zeros to the front

This question evaluates array manipulation and in-place algorithm competencies, including handling space-time trade-offs and preserving relative order...

Coding & Algorithms
4
0
38 people solved
Jan 30, 2026
Goldman Sachs logo
Goldman Sachs
Easy
Software Engineer

Implement a String Deque

Implement a double-ended queue (Deque) that stores strings. Your implementation must support the following operations: - addFirst(data): Insert data a...

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

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