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
Cursor logo
Cursor
Medium
Backend EngineerNew Grad

Implement Notification Rate Limiter

Implement should_send_notifications(user_id, timestamp) -> bool. You are given two mappings: - each user_id belongs to exactly one team_id - each team...

Coding & Algorithms
19
1
133 people solved
Feb 18, 2026
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer

Sample index from weighted probability distribution

Given an array weights[0..M-1] representing a discrete distribution over M outcomes, implement a function sampleIndex(weights) that returns an index i...

Coding & Algorithms
4
0
77 people solved
Feb 18, 2026
Armada logo
Armada
Medium
Software Engineer

Fetch paginated data from two APIs

Write a function get_enriched_records(api_a_url, api_b_url). api_a_url returns paginated JSON in the form: `json { "data": [ {"id": 1, "ref_id":...

Coding & Algorithms
3
0
27 people solved
Feb 17, 2026
PayPal logo
PayPal
Easy
Data Scientist

Compute variance of a list in Python

Task Given a Python list of numbers (ints/floats), write code to compute its variance. Requirements - Input: nums: list[float] (length \(n\ge 1\)) - C...

Coding & Algorithms
9
0
66 people solved
Feb 15, 2026
Palo logo
Palo
Medium
Software Engineer

Implement an Alert Execution Engine

You are given an alert client API that provides alert configurations, metric query execution, and notification methods. Implement an alert execution e...

Coding & Algorithms
0
0
8 people solved
Feb 13, 2026
Apple logo
Apple
Medium
Machine Learning Engineer

Implement Kubernetes Service Dependency Queries

You are given an in-memory inventory of Kubernetes-like services. Each service has the following fields: `text Service { id: string // ...

Coding & Algorithms
0
0
4 people solved
Feb 13, 2026
Databricks logo
Databricks
Hard
Software Engineer Locked

Find Path Between Fibonacci Tree Nodes

This question evaluates a candidate's ability to reason about recursive tree structures, map preorder indices to positions in a recursively defined Fi...

Coding & Algorithms
9
0
74 people solved
Feb 13, 2026
Grammarly logo
Grammarly
Medium
Software Engineer

Merge overlapping corrections

Implement correctionMerge(corrections). You are given a list of text-correction spans. Each correction applies to an inclusive interval [start, end] a...

Coding & Algorithms
11
0
107 people solved
Feb 13, 2026
Coinbase logo
Coinbase
Medium
Data Scientist

Implement Plus One

Given a non-empty array of digits representing a non-negative integer, where the most significant digit comes first and each element is in [0, 9], add...

Coding & Algorithms
4
0
52 people solved
Feb 13, 2026
Coinbase logo
Coinbase
Hard
Software Engineer

Maximize block fee with transaction selection

You are given N transactions. Each transaction has: - id (unique identifier) - size (positive integer) - fee (positive integer) You are building a blo...

Coding & Algorithms
29
0
311 people solved
Feb 13, 2026
Google logo
Google
Medium
Software EngineerNew Grad

Design Tic-Tac-Toe With K Players

Design and implement a Tic-Tac-Toe game engine. You are given: - k players, each with a unique player ID or mark. - An n x n board, initially empty. -...

Coding & Algorithms
3
0
20 people solved
Feb 12, 2026
Coursera logo
Coursera
Hard
Software Engineer

Implement Plurality and Runoff Voting

You are given a list of ballots for an election. Each ballot is an ordered list of distinct candidate names, from highest preference to lowest prefere...

Coding & Algorithms
1
0
21 people solved
Feb 12, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer

Implement sliding-window timestamped average

Problem Implement a class that maintains a time-based sliding window of records and can return the average score within the current window. Requiremen...

Coding & Algorithms
8
0
120 people solved
Feb 12, 2026
Google logo
Google
Medium
Software Engineer Locked

Find cheapest common ancestor in a tree

This question evaluates understanding of tree data structures and ancestor concepts (such as lowest common ancestor) along with algorithmic skills for...

Coding & Algorithms
18
1
132 people solved
Feb 12, 2026
Capital One logo
Capital One
Hard
Software Engineer

Solve multiple algorithmic interview questions

Below are several independent coding tasks. For each task, implement a function that returns the required output. Assume: - Arrays/lists are 0-indexed...

Coding & Algorithms
12
0
213 people solved
Feb 12, 2026
Applied logo
Applied
Easy
Software Engineer

Group duplicate files by content

Problem You are given a list of files in a filesystem. Each file has: - a full path (string) - a file size in bytes (integer) - file contents (concept...

Coding & Algorithms
4
0
38 people solved
Feb 12, 2026
LinkedIn logo
LinkedIn
Medium
Software Engineer

Design O(1) insert/delete and frequency-weighted random

Problem Design a data structure that supports the following operations in average \(O(1)\) time: 1. add(x) -> bool - Inserts value x into the colle...

Coding & Algorithms
14
1
199 people solved
Feb 12, 2026
Nuro logo
Nuro
Easy
Software Engineer Locked

Parse logs and count error codes

This question evaluates parsing and sanitizing structured text, extracting specific fields, and performing frequency aggregation of identifiers such a...

Coding & Algorithms
4
0
75 people solved
Feb 12, 2026
Snapchat logo
Snapchat
Medium
Machine Learning Engineer Locked

Find all quadruplets summing to target

This question evaluates competency in array algorithms, combinatorial search, and handling duplicates with index-uniqueness constraints, and falls und...

Coding & Algorithms
3
0
30 people solved
Feb 12, 2026
Robinhood logo
Robinhood
Medium
Software Engineer Locked

Compute dependency load factors in a DAG

This question evaluates understanding of graph theory and algorithms, specifically reachability and dependency analysis in a directed acyclic graph, a...

Coding & Algorithms
10
1
190 people solved
Feb 12, 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