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

Find missing rank in a straight

You are given a list of 4 distinct characters representing card ranks from a 5-card straight (5 consecutive ranks) with exactly one rank missing. Rank...

Coding & Algorithms
6
0
46 people solved
Feb 19, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Design structure for bottom-K customers by revenue

This question evaluates data structure design and algorithmic complexity for dynamic order-statistics and update operations, focusing on maintaining c...

Coding & Algorithms
7
0
81 people solved
Oct 29, 2025
Meta logo
Meta
Easy
Software Engineer Locked

Compute Range Sum Quickly

This question evaluates a candidate's understanding of range-sum queries, array preprocessing techniques and algorithmic complexity for answering mult...

Coding & Algorithms
3
0
49 people solved
Feb 18, 2026
Microsoft logo
Microsoft
Medium
Software Engineer

Solve three scheduling and array problems

In this round you are given three separate coding problems to solve. --- Problem 1: Schedule tasks with cooldown You are given: - A list of tasks, whe...

Coding & Algorithms
15
0
119 people solved
Oct 28, 2025
TikTok logo
TikTok
Easy
Data Scientist

Implement stacks, streaming median, and upward path sum

Complete the following coding problems. State the time/space complexity and key edge cases for each. 1) MinStack Design a stack that supports: - push(...

Coding & Algorithms
10
0
118 people solved
Feb 17, 2026
Plaid logo
Plaid
Medium
Machine Learning Engineer

Find Banks From Identifier Mappings

Plaid receives institution metadata from multiple sources. You are given two mappings: 1. code_to_institution: a one-to-one mapping from a bank code t...

Coding & Algorithms
0
0
10 people solved
Apr 30, 2026
Uber logo
Uber
Medium
Data ScientistNew Grad Locked

Compute CDF from a PDF Function

This question evaluates a candidate's skills in numerical integration, applied numerical methods, and probability/statistics by requiring construction...

Coding & Algorithms
3
0
42 people solved
Apr 30, 2026
Instacart logo
Instacart
Medium
Software Engineer

Implement prefix and suffix file search

Implement data structures and APIs to store file names and support efficient queries that match both a given prefix and suffix. Provide methods add(na...

Coding & Algorithms
6
0
113 people solved
Sep 6, 2025
Apple logo
Apple
Medium
Software Engineer

Refactor rock–paper–scissors for config and ties

Refactor an existing Rock–Paper–Scissors tournament with three robot players so that the number of rounds is configurable and the system also tracks t...

Coding & Algorithms
7
0
130 people solved
Sep 6, 2025
Optiver logo
Optiver
Medium
Data Scientist

Devise sequence-rule detection strategy

You are given an integer sequence with 2 ≤ n ≤ 50 terms, possibly following rules such as arithmetic/geometric progressions, alternating patterns, pol...

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

Implement KV store serialization

Implement serialization and deserialization for an in‑memory key‑value store to and from a contiguous bytes buffer. Keys are UTF‑8 strings; values may...

Coding & Algorithms
106
0
824 people solved
Sep 6, 2025
Google logo
Google
Medium
Software Engineer

Design autocomplete with Trie

Design and implement an autocomplete service backed by a prefix tree (Trie). The service stores a dynamic dictionary of words, each carrying an intege...

Coding & Algorithms
12
0
171 people solved
Sep 6, 2025
Lyft logo
Lyft
Medium
Software Engineer

Solve grid compromise spread with BFS

You are given an m×n grid representing a data center: 0 = empty rack, 1 = secure server, 2 = compromised server. Each minute, any secure server that i...

Coding & Algorithms
13
0
93 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Traverse binary tree by levels with constraints

Given a binary tree and a predicate P(node), perform a level-by-level traversal that collects, for each level, only the nodes whose values satisfy P. ...

Coding & Algorithms
2
0
36 people solved
Sep 6, 2025
Adobe logo
Adobe
Medium
Software Engineer

Determine task order with prerequisites

You are given n tasks labeled 0..n−1 and a list of prerequisite pairs (a, b) meaning task b must be completed before task a. Determine one valid order...

Coding & Algorithms
10
0
70 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find longest common contiguous subarray

Given two integer arrays A and B, find the length of the longest contiguous subarray that appears in both arrays. If multiple exist, return any one pa...

Coding & Algorithms
4
0
42 people solved
Sep 6, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Solve a two-jug measuring problem

You are given two jugs with capacities x and y liters and an unlimited water source. You may perform these operations: fill a jug, empty a jug, or pou...

Coding & Algorithms
7
0
69 people solved
Sep 6, 2025
Snapchat logo
Snapchat
Medium
Machine Learning Engineer

Determine Whether Courses Can Be Completed

You are given an integer numCourses, representing courses labeled from 0 to numCourses - 1, and a list prerequisites. Each prerequisite is a pair [cou...

Coding & Algorithms
0
0
9 people solved
Apr 29, 2026
Amazon logo
Amazon
Medium
Software EngineerIntern

Find a valid dependency order

You are given n tasks labeled from 0 to n - 1 and a list of dependency pairs dependencies, where each pair [a, b] means task b must be completed befor...

Coding & Algorithms
7
0
90 people solved
Feb 15, 2026
Voleon logo
Voleon
Hard
Software EngineerNew Grad Locked

Solve classic coding interview problems

These problems evaluate algorithmic problem-solving skills including dynamic programming and combinatorics for the egg-dropping scenario, array manipu...

Coding & Algorithms
25
0
166 people solved
Feb 15, 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