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

Implement a Radix Cache for Integer Sequences

Implement a RadixCache — a radix tree (prefix-compressed trie) that stores sequences of integers. In a plain trie, every node holds exactly one elemen...

Coding & Algorithms
0
0
10 people solved
Sep 21, 2025
Two Sigma logo
Two Sigma
Medium
Software Engineer

All Subsequences After Deleting One Character

You are given a string s of length n consisting of lowercase English letters. Consider every string that can be obtained by deleting exactly one chara...

Coding & Algorithms
0
0
7 people solved
Sep 19, 2025
Two Sigma logo
Two Sigma
Medium
Software Engineer

Autoscale a Server Fleet from Throughput Readings

You run a service on a fleet of identical servers behind a load balancer. Each server can handle at most limit units of throughput. A monitoring syste...

Coding & Algorithms
0
0
5 people solved
Sep 19, 2025
Capital One logo
Capital One
Medium
Software Engineer

Count ordered pairs that concatenate to target

Given a list of integers numbers and an integer target, count the number of ordered pairs (i, j) with i != j such that concatenating numbers[i] follow...

Coding & Algorithms
15
0
109 people solved
Sep 19, 2025
Disney logo
Disney
Medium
Data Scientist

Solve matrix add, frequency count, longest consecutive

You are asked to solve the following 3 coding tasks (in any language). Implement each as a function. 1) Add two matrices Input: Two 2D integer arrays ...

Coding & Algorithms
6
0
43 people solved
Sep 13, 2025
Pinterest logo
Pinterest
Medium
Software Engineer

Implement stream line reader and settle balances

Part 1: Streaming line reader from chunked source You are given an existing class ChunkSource with a method nextChunk() that returns the next piece of...

Coding & Algorithms
24
0
202 people solved
Sep 10, 2025
Aeonea logo
Aeonea
Medium
Software Engineer

Find two numbers summing to target

Given an unsorted integer array and a target value, return the indices of two distinct elements whose sum equals the target. Aim for an O(n) time solu...

Coding & Algorithms
1
0
10 people solved
Sep 6, 2025
Aeonea logo
Aeonea
Medium
Software Engineer

Implement a tennis score tracker

Design and implement a tennis game scoring function. Input: a stream of points won by players 'A' or 'B' (e.g., A, B, B, B, B). After each point, outp...

Coding & Algorithms
0
0
7 people solved
Sep 6, 2025
Cisco logo
Cisco
Medium
Software Engineer

Solve max-subarray, min-unique, and grid-jump

1) Given an integer array nums, find a contiguous subarray with the maximum possible sum. Return (maxSum, startIndex, endIndex). If multiple subarrays...

Coding & Algorithms
0
0
11 people solved
Sep 6, 2025
Palo Alto Networks logo
Palo Alto Networks
Medium
Software Engineer

Design an O(1) eviction cache

Implement an in-memory key–value cache with fixed capacity that evicts the least recently used entry when full. Support get(key) -> value or -1 if mis...

Coding & Algorithms
1
0
3 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find earliest time password becomes irrecoverable

You are given a password string of length n and an attack order array attackOrder[1..n], a permutation of 1..n. At second i (1-indexed), the virus rep...

Coding & Algorithms
1
0
9 people solved
Sep 6, 2025
Datadog logo
Datadog
Medium
Software Engineer

Implement write with internal buffer

Implement a buffered writer over an expensive sink API. You are given a function writeToDevice(byte[] chunk) that may accept at most M bytes per call ...

Coding & Algorithms
0
0
8 people solved
Sep 6, 2025
eBay logo
eBay
Medium
Software Engineer

Pass functions and analyze basic data structures

Implement a function applyTwice(f, x) that accepts a function f and a value x and returns f(f(x)) in your preferred language. Demonstrate how to pass ...

Coding & Algorithms
0
0
7 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Design dasher-to-order assignment algorithm

You are building a real-time 'dasher picker' that assigns delivery drivers (Dashers) to incoming orders. Define objective(s) (e.g., minimize ETA and c...

Coding & Algorithms
1
0
13 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find returning users from access logs

Given an unordered log of web access events, identify which users are returning (i.e., they have visited on at least two different calendar days). Eac...

Coding & Algorithms
1
0
8 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Design an in-memory database with TTL and history

Design and implement an in-memory key–field–value store with monotonic timestamps. Keys and fields are strings; values are integers. Provide these API...

Coding & Algorithms
9
0
100 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Implement power and balance-parentheses algorithms

Design and implement two algorithms: 1) Fast exponentiation: Implement a function pow(x, n) that returns a real number x raised to an integer exponent...

Coding & Algorithms
2
0
31 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Implement BST vertical traversal and list conversion

Given the root of a binary search tree (BST): 1) Implement vertical order traversal: assign the root column 0, left child column −1, right child colum...

Coding & Algorithms
2
0
46 people solved
Sep 6, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Implement banking ops: transfer, top-k, cashback, merge

Design and implement an in-memory banking system that supports: ( 1) CreateAccount(id, initialBalance) and Transfer(fromId, toId, amount) with validat...

Coding & Algorithms
15
0
132 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Implement exponentiation and link tree neighbors

Solve two independent tasks. Task A — Fast exponentiation: Implement fastExponent(x, n) that returns x raised to the integer power n, where x is a dou...

Coding & Algorithms
3
0
40 people solved
Sep 6, 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