Coding & Algorithms Interview Questions

Practice 3,429 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.4k Questions 368 Companies08.11.2026
Showing 20 results
Role
Google logo
Google
Medium
Software Engineer

Solve three coding interview problems

You are given three independent coding questions. 1) Decode an encoded string Given an encoded string s, decode it using the following rule: - Pattern...

Coding & Algorithms
18
0
199 people solved
Oct 9, 2025
Apple logo
Apple
Medium
Software Engineer

Minimal Unique Word Abbreviations

Minimal Unique Word Abbreviations You are given an array words of n distinct strings. Produce a minimal abbreviation for every word according to the r...

Coding & Algorithms
1
0
10 people solved
Jun 30, 2026
Walmart logo
Walmart
Medium
Software Engineer

Compute the Minimum Number of Meeting Rooms

Compute the Minimum Number of Meeting Rooms Problem Implement minimumMeetingRooms(intervals) -> rooms. Each interval is a two-element integer array [s...

Coding & Algorithms
0
0
2 people solved
Jul 17, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Validate Sorted Order Under a Custom Alphabet

This question evaluates a candidate's ability to apply custom ordering rules and string comparison logic, a common variant of array and string validat...

Coding & Algorithms
2
0
18 people solved
Jun 20, 2026
Apple logo
Apple
Medium
Machine Learning Engineer

Implement permutations and image retrieval

The coding portion included several short exercises for a vision-focused ML role: 1. Given an array of distinct integers, return all possible permutat...

Coding & Algorithms
18
0
179 people solved
Mar 1, 2026
Headway logo
Headway
Medium
Software Engineer

Debug and extend obstacle-run statistics classes

Problem: Obstacle course run statistics (debug + implement) You are building software to track how long racers take to complete an obstacle course. Do...

Coding & Algorithms
29
0
222 people solved
Feb 11, 2026
Nebius logo
Nebius
Medium
Software EngineerIntern

Solve four coding problems

The interview included four independent coding problems: 1. Longest all-healthy service streak You are given the daily health-check results for mul...

Coding & Algorithms
5
0
48 people solved
Apr 5, 2026
Uber logo
Uber
Medium
Software EngineerSenior+ Locked

Shortest Path in a Grid with Blocked Cells

This question tests a candidate's practical grasp of graph traversal algorithms applied to 2D grid problems, specifically BFS for unweighted shortest-...

Coding & Algorithms
0
0
10 people solved
Jun 19, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Find Shortest Unique Prefixes

This question evaluates string-processing skills and understanding of data structures for prefix management (e.g., tries), along with algorithmic effi...

Coding & Algorithms
2
0
14 people solved
Jun 18, 2026
Anthropic logo
Anthropic
Hard
Software Engineer

Calculate Streaming Token Usage Costs

Calculate Streaming Token Usage Costs Implement a usage calculator for language-model API requests. Input and output tokens have different prices, and...

Coding & Algorithms
1
0
16 people solved
Jul 8, 2026
Anthropic logo
Anthropic
Hard
Software Engineer

Build a Versioned In-Memory Database

Build a Versioned In-Memory Database The source reports a four-stage in-memory database exercise but does not provide its exact method signatures. The...

Coding & Algorithms
2
0
18 people solved
Jul 8, 2026
Google logo
Google
Hard
Software Engineer

Find maximum value in huge text file

You are given the path to a very large text file on disk. The file has the following properties: - Each line contains exactly one signed 64-bit intege...

Coding & Algorithms
31
0
225 people solved
Dec 8, 2025
Remitly logo
Remitly
Easy
Software Engineer

Determine Whether Two Strings Are Isomorphic

Determine Whether Two Strings Are Isomorphic Problem Implement areIsomorphic(source, target) -> result. Two strings are isomorphic when every characte...

Coding & Algorithms
0
1
13 people solved
Apr 14, 2026
Uber logo
Uber
Medium
Software EngineerSenior+

Solve stock profit and vertical tree traversal

You have a 60-minute coding interview with two algorithm questions: 1) Max profit from one stock trade - Input: an integer array prices, where prices[...

Coding & Algorithms
13
0
138 people solved
Feb 9, 2026
Waymo logo
Waymo
Medium
Software Engineer

Build an Expression That Reaches a Target

Build an Expression That Reaches a Target Given a sequence of integers and a target, insert +, -, or * between adjacent numbers and add parentheses so...

Coding & Algorithms
0
0
12 people solved
Jul 7, 2026
Capital One logo
Capital One
Medium
Software Engineer

Sort Matrix Diagonals By Their Values

Given an n x n matrix of lowercase letters, consider every diagonal that runs from bottom-left to top-right. There are 2n - 1 such diagonals. Assign e...

Coding & Algorithms
3
1
24 people solved
Jul 7, 2026
Microsoft logo
Microsoft
Medium
Data Scientist

Compute the Product of an Array Except Self

The interview report preserved the input-output example but not every original restriction. The following is a self-contained version of the reported ...

Coding & Algorithms
8
1
59 people solved
May 4, 2026
Jane Street logo
Jane Street
Medium
Software Engineer Locked

Implement a Circular Buffer

This question evaluates understanding of data structures and buffer management, specifically FIFO semantics, fixed-capacity storage, wraparound indexi...

Coding & Algorithms
4
0
50 people solved
May 20, 2026
Virtu logo
Virtu
Medium
Data Scientist Locked

Maximize Points by Buying Cost-Multiplier Cards

This question evaluates a candidate's ability to reason about optimal ordering and subset selection under a multiplicative-then-subtractive scoring ru...

Coding & Algorithms
1
0
13 people solved
Jun 25, 2026
Google logo
Google
Medium
Software Engineer Locked

Assign meetings to rooms with delays

This question evaluates skill in scheduling algorithms, priority queue and heap usage, greedy decision-making, and time-based event simulation for man...

Coding & Algorithms
12
1
146 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