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
Ansys logo
Ansys
Medium
Software EngineerIntern

Implement Prefix Search and Node Removal

This interview included two coding tasks: 1. Implement a prefix-search data structure for strings with two operations: insert(word) and count_with_pre...

Coding & Algorithms
3
0
28 people solved
Dec 31, 2025
Meta logo
Meta
Medium
Software Engineer Locked

Maximize Letters from Disjoint Words

This question evaluates understanding of combinatorial selection, set-based constraints, and efficient representation and enumeration of candidate sub...

Coding & Algorithms
2
0
23 people solved
Dec 30, 2025
Uber logo
Uber
Easy
Software Engineer

Find smallest start index avoiding left exit

You are given an integer array jump of length n (0-indexed). If you are currently at index i, your next position becomes i + jump[i] (a positive value...

Coding & Algorithms
5
0
43 people solved
Dec 30, 2025
Apple logo
Apple
Medium
Analytics Engineer

Implement most frequent key without using max()

You are given the following Python class skeletons. The Parent class precomputes: - self.l: the original list - self.lf: a set of the stringified item...

Coding & Algorithms
5
0
65 people solved
Dec 30, 2025
Uber logo
Uber
Medium
Software Engineer

Build a Quadtree and Analyze a Graph

Solve the following two coding problems. 1. Build a quadtree from an image You are given an N x N matrix of integers representing an image, where N is...

Coding & Algorithms
8
0
61 people solved
Dec 28, 2025
Google logo
Google
Medium
Software EngineerIntern Locked

Maximize 1D deliveries within distance and minimize total distance

This question evaluates combinatorial optimization and constrained matching skills, focusing on reasoning about distance-based pairings, lexicographic...

Coding & Algorithms
7
0
81 people solved
Dec 27, 2025
ZipHQ logo
ZipHQ
Medium
Software Engineer

Maximize non-adjacent sum on an N-ary tree

You are given an N-ary tree (each node may have 0..k children). Each node contains an integer value (can be 0 or positive). You want to select a set o...

Coding & Algorithms
28
0
288 people solved
Dec 26, 2025
LinkedIn logo
LinkedIn
Medium
Software EngineerSenior+ Locked

Compute graph distance and impacted services

This question evaluates proficiency in graph algorithms and traversal (shortest-path/BFS and cycle handling), file-path/tree modeling, dependency grap...

Coding & Algorithms
15
0
164 people solved
Dec 26, 2025
Uber logo
Uber
Hard
Software Engineer

Find cheapest flight with at most K stops

Problem You are given a directed weighted graph representing flights between cities. Inputs - An integer n: number of cities, labeled 0..n-1. - A list...

Coding & Algorithms
8
0
79 people solved
Dec 25, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Implement cloud storage with quotas and compression

Problem Implement an in-memory cloud storage service that supports multiple users, per-user storage quotas, changing quotas with eviction, and file co...

Coding & Algorithms
22
0
217 people solved
Dec 25, 2025
TikTok logo
TikTok
Easy
Software Engineer Locked

Solve three classic coding problems

These tasks evaluate algorithmic problem-solving, data structure mastery, and implementation skills within the Coding & Algorithms domain, touching on...

Coding & Algorithms
4
0
37 people solved
Dec 24, 2025
Shopify logo
Shopify
Easy
Software Engineer

Implement a multi-rover Mars controller

Problem Build a small command-line “Mars Rover Controller” program. Single rover (v1) A rover starts at coordinate (0, 0) on an infinite 2D grid and i...

Coding & Algorithms
34
0
383 people solved
Dec 23, 2025
Roblox logo
Roblox
Medium
Software Engineer

Can the character reach the destination?

You control a character starting at a start cell and want to reach a target cell in a 2D grid. Some cells are blocked by obstacles and cannot be enter...

Coding & Algorithms
9
0
100 people solved
Dec 21, 2025
Instacart logo
Instacart
Medium
Software Engineer

Implement timestamped task management system APIs

You are implementing an in-memory Task Management System. All API methods are called with a timestamp representing the logical time when the operation...

Coding & Algorithms
25
0
223 people solved
Dec 21, 2025
Apple logo
Apple
Medium
Machine Learning Engineer

Solve stock and banana problems

Solve both coding problems below. 1. Maximum single-transaction stock profit: Given an array prices where prices[i] is the stock price on day i, retur...

Coding & Algorithms
3
0
42 people solved
Dec 17, 2025
Discord logo
Discord
Hard
Software EngineerSenior+

Implement User Sessionization From Event Stream

You are building a backend data-processing component that consumes a stream of newline-delimited JSON events. Each event represents a user sending a m...

Coding & Algorithms
1
0
21 people solved
Dec 16, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute courier pay and implement load balancing

Problem 1: Compute courier (delivery driver) pay You are given a sequence of delivery-related events for a courier during a day. Your task is to compu...

Coding & Algorithms
121
0
949 people solved
Dec 16, 2025
Meta logo
Meta
Medium
Software Engineer

Answer four string/array/battery coding questions

You are given four independent coding questions. Problem A — Uppercase vs lowercase count difference Given a string s (ASCII), count how many characte...

Coding & Algorithms
4
0
46 people solved
Dec 16, 2025
Two Sigma logo
Two Sigma
Hard
Software Engineer

Implement binary encode/decode with frequency tree

Problem Implement a binary encoding and decoding scheme for strings based on character frequencies (Huffman-like coding). You must implement two funct...

Coding & Algorithms
8
0
132 people solved
Dec 15, 2025
TikTok logo
TikTok
Easy
Software Engineer

Implement an LRU cache

Problem: LRU Cache Design and implement a data structure that supports an LRU (Least Recently Used) cache with a fixed capacity. Requirements Implemen...

Coding & Algorithms
5
0
74 people solved
Dec 15, 2025

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