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

Implement Composable Range Iterators

Implement an iterator library: range(start, end, step= 1) supporting forward/backward iteration, inclusive/exclusive endpoints, negative steps, and ov...

Coding & Algorithms
13
0
173 people solved
Sep 6, 2025
Figma logo
Figma
Medium
Software Engineer

Design document layer with undo/redo

Design a document layer that supports applying edits and undo/redo. Implement apply(op) to mutate the document, undo() to revert the most recent commi...

Coding & Algorithms
23
0
317 people solved
Sep 6, 2025
xAI logo
xAI
Medium
Software Engineer

Define and compare smart pointers

What is a smart pointer? How do smart pointers manage ownership and lifetimes compared with raw pointers? Describe common types (unique, shared, weak)...

Coding & Algorithms
5
0
107 people solved
Aug 12, 2025
Optiver logo
Optiver
Hard
Software Engineer

Count Ordered Sequences That Sum to a Target

Count Ordered Sequences That Sum to a Target Given a positive target n and a set of unique positive order sizes, count the distinct ordered sequences ...

Coding & Algorithms
0
0
2 people solved
Apr 28, 2026
OpenAI logo
OpenAI
Medium
Software Engineer

Generate Data Labeling Schedules

A data labeling platform manages tasks, AI models, and human annotators. Each entity has a 1-indexed string ID. You are given four integers: totalTask...

Coding & Algorithms
7
0
54 people solved
Apr 28, 2026
Airbnb logo
Airbnb
Hard
Software Engineer

Find hotel pairs to cover a split stay

You are implementing a simplified “split stay” feature. Problem You are given: - n hotels (or listings), indexed 0..n-1. - For each hotel i, an unsort...

Coding & Algorithms
42
1
315 people solved
Nov 18, 2025
Snowflake logo
Snowflake
Medium
Software Engineer Locked

Answer Repeated Lookup Queries Efficiently

Implement batched lookups over a sorted integer array, returning the first index of each queried value while preserving query order. Account for dupli...

Coding & Algorithms
2
0
15 people solved
Jun 12, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

In-Memory URL Shortener: Encode and Decode

This question evaluates a candidate's ability to design a class-based data structure with paired encode and decode operations that maintain a consiste...

Coding & Algorithms
0
0
7 people solved
Jun 12, 2026
Optiver logo
Optiver
Medium
Software Engineer

Compare common data structures and uses

Compare common data structures and uses Compare common data structures and select appropriate ones for specific tasks. For arrays, linked lists, stack...

Coding & Algorithms
23
0
213 people solved
Jul 17, 2025
Two Sigma logo
Two Sigma
Easy
Data Scientist Locked

Merge two sorted lists

This question evaluates a candidate's competency in array manipulation and merging algorithms, emphasizing understanding of ordered data and time comp...

Coding & Algorithms
4
0
69 people solved
Feb 13, 2026
Square logo
Square
Medium
Software EngineerSenior+

Build a Trust-Aware BIN Database

Build a Trust-Aware BIN Database Implement process_bin_operations(operations) for an in-memory database of card-number prefixes. A prefix identifies a...

Coding & Algorithms
1
0
14 people solved
Apr 27, 2026
NVIDIA logo
NVIDIA
Medium
Software Engineer

Solve unique triplets summing to target

Solve unique triplets summing to target Implement a function that, given an integer array nums and an integer target T, returns all unique triplets [x...

Coding & Algorithms
5
0
87 people solved
Jul 15, 2025
Applied logo
Applied
Hard
Machine Learning Engineer

Validate Nested Configuration Objects

You are given a set of custom descriptor objects that define the expected schema of a configuration object. Implement a validator that checks whether ...

Coding & Algorithms
2
0
41 people solved
Jan 12, 2026
Salesforce logo
Salesforce
Medium
Machine Learning EngineerSenior+

Build a concurrent site crawler

Implement a small crawler in Python for a single target website. Requirements: - Input: a start URL, a maximum crawl depth, and an output CSV path. - ...

Coding & Algorithms
9
0
91 people solved
Jan 12, 2026
TikTok logo
TikTok
Medium
Software Engineer Locked

Solve common string/DP/stack problems

This set of four coding tasks evaluates proficiency in string algorithms, dynamic programming, sliding-window techniques, monotonic stack usage, and t...

Coding & Algorithms
8
0
107 people solved
Feb 12, 2026
Google logo
Google
Medium
Software Engineer Locked

Solve graph and linked list tasks

This question evaluates competencies in dependency graph modeling and reachability, shortest-path computation in weighted directed graphs, and space-e...

Coding & Algorithms
17
0
178 people solved
Feb 12, 2026
Mithril logo
Mithril
Medium
Software Engineer

Parse code into operation triads IR

Problem: Operation-Triads Parsing (Mini Language) You are given a small, line-based programming language consisting of assignment statements and non-n...

Coding & Algorithms
5
0
71 people solved
Feb 12, 2026
Google logo
Google
Medium
Software Engineer

Implement frequency + distance top‑K queries

You will implement solutions for two coding interview questions. Question 1: Return the top‑K points by frequency (with distance tie‑break) You are gi...

Coding & Algorithms
74
0
620 people solved
Feb 12, 2026
Fuse Energy logo
Fuse Energy
Medium
Software Engineer

Implement spreadsheet cells with formulas

Design an in-memory spreadsheet that supports these operations on cells such as A1, B2, and ranges such as A1:B2: - Set(cell, value): assign an intege...

Coding & Algorithms
34
0
251 people solved
Jan 11, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Add Consecutive-Value Bonuses to Grid Paths

Extend the maximum-score grid path with bonuses for equal adjacent values and strictly increasing triples of visited cells. Dynamic programming must r...

Coding & Algorithms
0
0
19 people solved
Jun 11, 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