Coding & Algorithms Interview Questions

Practice 3,469 real Coding & Algorithms interview questions for 2026. Covers companies like Meta, Amazon, Google, Uber, and Microsoft. Real questions from actual interviews with detailed solutions — ideal for focused interview preparation. Coding & Algorithms interview questions are the single most common technical gate for software engineering roles and are used to evaluate problem framing, algorithm selection, complexity trade-offs, correctness, edge-case reasoning, and clear communication under time pressure. Expect this category to appear in early technical screens and repeatedly across onsite loops at companies that weight it heavily (notably Meta, Google, and Amazon). Interviews will test arrays and strings, trees and graphs, dynamic programming, hashing and two‑pointer techniques, and the candidate’s ability to test and optimize code in a shared editor. Prepare with timed mock interviews, practice in the same editor you’ll use live, and build a progressive schedule that moves from fundamentals to medium/hard problems; typical candidates invest several weeks to a few months of focused practice depending on seniority and target company.

3.5k Questions 368 Companies08.11.2026
Showing 20 results
Role
Glean logo
Glean
Medium
Machine Learning Engineer

Find Earliest Train Route

You are given a discrete train timetable and need to find a valid route through the train network. Each train has an itinerary represented as a sequen...

Coding & Algorithms
3
0
33 people solved
Apr 23, 2026
Glean logo
Glean
Medium
Machine Learning Engineer AI

Implement Rate-Limited Wikipedia Crawler

Implement a rate-limited Wikipedia crawler. You may use an AI coding assistant during the interview, such as Cursor or Claude Code. You are expected t...

Coding & Algorithms
0
0
13 people solved
Apr 23, 2026
OpenAI logo
OpenAI
Medium
Backend Engineer

Convert IPv4 Ranges to CIDR Blocks

Implement a function that summarizes a consecutive IPv4 address range using the smallest possible list of CIDR blocks. You are given: - start_ip: a va...

Coding & Algorithms
6
0
106 people solved
Apr 22, 2026
Uber logo
Uber
Easy
Software Engineer

Solve three algorithmic optimization and search problems

You are given three independent coding problems. --- Problem 1: Allocate tasks between two workers to maximize reward You have n independent tasks tha...

Coding & Algorithms
13
0
98 people solved
Oct 7, 2025
Netflix logo
Netflix
Medium
Software Engineer Locked

Compute minimum semesters to finish courses

This question evaluates graph theory and scheduling competencies, including dependency resolution, cycle detection in directed graphs, and capacity-co...

Coding & Algorithms
15
0
225 people solved
Feb 4, 2026
Robinhood logo
Robinhood
Medium
Software Engineer

Produce a Deterministic Course Plan

Produce a Deterministic Course Plan There are num_courses courses numbered 0 through num_courses - 1. Each prerequisite pair is [course, prerequisite]...

Coding & Algorithms
1
0
15 people solved
Apr 21, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist

Compute Piecewise Linear Interpolation

You are given an unsorted list of distinct 2D points (x_i, y_i). When the points are sorted by x_i, connecting adjacent points forms a polyline. Given...

Coding & Algorithms
1
0
11 people solved
Apr 21, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Count Valid Infection Orders

This question evaluates combinatorial enumeration and algorithmic reasoning by counting valid sequences of state changes in a linear infection process...

Coding & Algorithms
2
0
24 people solved
Apr 21, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Design hierarchical path store with create/set/get/remove

Design a hierarchical key-value path store supporting four operations on UNIX-style absolute paths (e.g., "/a/b"). Implement: 1) create(path, value): ...

Coding & Algorithms
3
0
61 people solved
Aug 13, 2025
DoorDash logo
DoorDash
Medium
Machine Learning Engineer Locked

Minimize batches and allocate riders by time

This question set evaluates algorithmic problem-solving in scheduling and resource allocation, assessing understanding of batching under capacity and ...

Coding & Algorithms
17
0
248 people solved
Feb 3, 2026
Bytedance logo
Bytedance
Medium
Software EngineerSenior+

Implement Sliding Windows and LRU Cache

You are given two coding tasks. Task 1: Longest Subarray of Ones Given a binary array nums and an integer k, return the maximum length of a contiguous...

Coding & Algorithms
1
0
15 people solved
Apr 20, 2026
Upstart logo
Upstart
Medium
Data Scientist

Implement decay simulation and trailing-zero counting

Implement the following in Python: 1) Radioactive decay simulation: Half-life is 1 day. Write a simulation function that takes: - input: integer m ...

Coding & Algorithms
7
0
63 people solved
Nov 29, 2025
NVIDIA logo
NVIDIA
Medium
Software Engineer

Explain a shader compiler pipeline

Explain a shader compiler pipeline Describe the architecture of a shader compiler that ingests GLSL/HLSL and outputs SPIR-V or ISA. Cover lexical anal...

Coding & Algorithms
8
0
70 people solved
Aug 9, 2025
Bytedance logo
Bytedance
Medium
Data Scientist

Compute Minimum Parentheses Additions

Given a string s consisting only of the characters '(' and ')', compute the minimum number of parentheses that must be inserted anywhere in the string...

Coding & Algorithms
2
0
37 people solved
Apr 19, 2026
PayPal logo
PayPal
Medium
Software Engineer

Explain HashMap internals and collisions

Explain HashMap internals and collisions In Java, describe the underlying data structures used by HashMap (e.g., array of buckets, linked lists vs tre...

Coding & Algorithms
6
0
67 people solved
Aug 7, 2025
Stripe logo
Stripe
Medium
Software Engineer Locked

Validate KYC CSV Records

This question evaluates skills in CSV parsing, string normalization, field-level validation, and rule-based text matching, emphasizing attention to ed...

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

Design Sliding-Window Average Tracker

This question evaluates design and implementation of a time-windowed tracking data structure, focusing on streaming aggregation, handling monotonic ti...

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

Implement string compression and decompression

This question evaluates proficiency in string manipulation, run-length encoding concepts, parsing numeric counts, and validation of encoded formats, i...

Coding & Algorithms
1
0
14 people solved
Jan 30, 2026
xAI logo
xAI
Medium
Software Engineer Locked

Design a Recoverable Iterator

This question evaluates data-structure and state-management skills, focusing on iterator semantics, snapshotting/restore mechanics, and efficient time...

Coding & Algorithms
3
0
35 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

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