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
Google logo
Google
Easy
Software Engineer Locked

Design compressed vector and compute dot product

This question evaluates understanding of data structure design, sequence compression concepts (such as run-length patterns), and numeric algorithm eff...

Coding & Algorithms
4
0
82 people solved
Jan 11, 2026
Walmart Labs logo
Walmart Labs
Hard
Software Engineer

Shortest Talent-Covering Team Starting At Each Index

There are n students in a line. Each student has exactly one talent represented by an integer from 1 to talentsCount. A valid team is a contiguous sub...

Coding & Algorithms
1
0
11 people solved
Apr 6, 2026
Fora Travel logo
Fora Travel
Medium
Software Engineer

Merge Sorted Arrays

You are given two related tasks about sorted integer arrays. 1. Implement a function that takes two arrays sorted in nondecreasing order and returns a...

Coding & Algorithms
0
0
6 people solved
Apr 6, 2026
Grammarly logo
Grammarly
Medium
Software Engineer

Implement a Transactional Key-Value Store

Design an in-memory key-value store that supports transactions. Required operations: - set(key, value): assign or overwrite the value for a key. - get...

Coding & Algorithms
6
0
61 people solved
Apr 6, 2026
LinkedIn logo
LinkedIn
Medium
Software Engineer

Process Mutable Matrix Sum Queries

You are given a 2D integer matrix and a list of queries. There are two query types: - set r c v: update the value at row r and column c to v - get r1 ...

Coding & Algorithms
2
0
27 people solved
Apr 6, 2026
Anthropic logo
Anthropic
Medium
Machine Learning Engineer Locked

Convert State Stream to Events

This question evaluates a candidate's ability to process sequential categorical data by identifying and summarizing consecutive runs, reason about tim...

Coding & Algorithms
47
0
454 people solved
Apr 6, 2026
Verkada logo
Verkada
Medium
Frontend EngineerNew Grad Locked

Implement a recency cache and min-coins DP

This question evaluates data structure design and algorithmic problem-solving skills, focusing on an LRU-style recency cache and a dynamic programming...

Coding & Algorithms
5
0
43 people solved
Jan 10, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Compute infection spread time

This question evaluates understanding of grid-based graph traversal and propagation dynamics, testing competencies in breadth-first search concepts, s...

Coding & Algorithms
9
0
126 people solved
Jan 9, 2026
OpenAI logo
OpenAI
Medium
Software Engineer

Implement a memory allocator with malloc/free

Problem You are implementing a simplified memory allocator over a contiguous memory region. Initialize the allocator with a fixed total size: - alloca...

Coding & Algorithms
19
0
201 people solved
Jan 9, 2026
Robinhood logo
Robinhood
Medium
Frontend Engineer

Build a Weekly Calendar

Implement an interactive weekly calendar UI. Requirements: - Display a one-week calendar with 7 days. - The calendar should be divided into 1-hour tim...

Coding & Algorithms
0
0
15 people solved
Apr 5, 2026
Zest logo
Zest
Hard
Data Scientist

Compute tree depth and meeting rooms

Solve both coding problems. Problem 1: Maximum depth of a binary tree Given the root of a binary tree, return its maximum depth. The maximum depth is ...

Coding & Algorithms
1
0
23 people solved
Apr 5, 2026
Visa logo
Visa
Medium
Software EngineerNew Grad

Solve Three Array Coding Problems

An online assessment contains the following three independent coding problems. For each problem, write a function that returns the requested value. Us...

Coding & Algorithms
3
0
47 people solved
Apr 5, 2026
Anthropic logo
Anthropic
Medium
Software Engineer Locked

Build a concurrent web crawler

This question evaluates understanding of concurrent programming, synchronization, thread safety, and graph traversal as applied to a multithreaded web...

Coding & Algorithms
22
0
144 people solved
Apr 5, 2026
Squarespace logo
Squarespace
Easy
Software Engineer

Count Numbers Inside All Intervals

You are given: 1. An integer array nums. 2. A list of intervals intervals, where each interval is represented as [start, end]. The intervals are not s...

Coding & Algorithms
3
1
30 people solved
Apr 5, 2026
Roku logo
Roku
Medium
Software Engineer Locked

Compute longest common subsequence length

This question evaluates understanding of dynamic programming and sequence processing, measuring competence in reasoning about optimal substructure, ov...

Coding & Algorithms
6
0
74 people solved
Jan 8, 2026
Applied logo
Applied
Hard
Software Engineer

Implement Nested Transactional Key-Value Store

Implement an in-memory key-value store that processes a batch of commands, one command per line. The store must support nested transactions. Supported...

Coding & Algorithms
2
0
25 people solved
Apr 4, 2026
SoFi logo
SoFi
Easy
Software Engineer Locked

Count numbers with same popcount up to all-ones bound

This question evaluates skill in bit manipulation and combinatorial counting over binary representations in the Coding & Algorithms domain, specifical...

Coding & Algorithms
18
0
129 people solved
Jan 7, 2026
Databricks logo
Databricks
Hard
Software Engineer Locked

Find all anagram start indices

This question evaluates proficiency in string manipulation, algorithmic efficiency, and pattern detection through character frequency analysis, assess...

Coding & Algorithms
14
0
138 people solved
Jan 7, 2026
Wave logo
Wave
Hard
Software Engineer Locked

Construct a circular gift exchange across families

This question evaluates ability to model constrained permutations and apply graph-theoretic and combinatorial reasoning to produce a single circular o...

Coding & Algorithms
3
0
30 people solved
Jan 6, 2026
PayPal logo
PayPal
Medium
Software Engineer Locked

Solve common search/parse/graph frequency tasks

This multi-part question evaluates algorithmic problem-solving skills across searching and sorting variants, rotated-array search, nested string decod...

Coding & Algorithms
5
0
69 people solved
Jan 6, 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