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
Airbnb logo
Airbnb
Hard
Software Engineer

Count Consecutive Positive Integer Sums

Count Consecutive Positive Integer Sums Given a positive integer n, return the number of ways to write n as a sum of one or more consecutive positive ...

Coding & Algorithms
1
0
10 people solved
Apr 21, 2026
Optiver logo
Optiver
Medium
Software Engineer

Days Between Two Calendar Dates

Days Between Two Calendar Dates You are given two dates as strings, each in the format YYYY-MM-DD. Write a function that returns the number of days be...

Coding & Algorithms
2
0
20 people solved
Apr 21, 2026
Point72 logo
Point72
Hard
Data Engineer

Implement Election Report and Banking Pipeline

You are given two independent data engineering coding tasks. Task 1: SQL Election Exit Poll by State Report An election analytics team needs a report ...

Coding & Algorithms
1
0
26 people solved
Apr 21, 2026
Chicago logo
Chicago
Medium
Software Engineer

Build an Ordered Latest-Quote Container

Build an Ordered Latest-Quote Container Implement a top-level operation runner for incoming stock quotes. At most one quote per symbol may be present....

Coding & Algorithms
1
0
12 people solved
Apr 20, 2026
Chicago logo
Chicago
Medium
Software Engineer

Implement a Constant-Time Simple Moving Average

Implement a Constant-Time Simple Moving Average Implement a top-level operation runner for a simple moving average over a fixed-size window of the mos...

Coding & Algorithms
1
0
13 people solved
Apr 20, 2026
Upstart logo
Upstart
Medium
Software Engineer

Implement Three Assessment Functions

An online assessment contains three independent programming tasks. Implement each function clearly and efficiently. 1. Compute coordinate bounds - ...

Coding & Algorithms
1
0
12 people solved
Apr 20, 2026
Amazon logo
Amazon
Medium
Software EngineerIntern

Implement Cache and Rotate Matrix

Solve the following two independent coding tasks. Task 1: Implement an LRU Cache Design a data structure LRUCache that stores integer keys and integer...

Coding & Algorithms
2
0
49 people solved
Apr 20, 2026
Google logo
Google
Medium
Software Engineer

Count Spellings Using Chemical Element Symbols

Count Spellings Using Chemical Element Symbols Problem Given a list of valid chemical element symbols and a target word, count how many distinct ways ...

Coding & Algorithms
0
1
7 people solved
Apr 19, 2026
Anthropic logo
Anthropic
Medium
Software Engineer

Implement a Least-Recently-Used Cache

Design and implement an in-memory least-recently-used cache. Requirements: - The cache is initialized with a positive integer capacity. - Implement ge...

Coding & Algorithms
1
0
7 people solved
Apr 19, 2026
Uber logo
Uber
Medium
Machine Learning EngineerSenior+

Find a Black-Box Convex Function Minimum

You are given access to a black-box function F(x): each call returns the function value at a real number x. You are also given a search interval [a, b...

Coding & Algorithms
0
0
9 people solved
Apr 19, 2026
Uber logo
Uber
Medium
Machine Learning Engineer

Implement a Referral Revenue Tracker

Implement an in-memory revenue tracking system for customers in a referral network. Each customer has their own direct revenue. A customer may also ha...

Coding & Algorithms
7
0
77 people solved
Apr 19, 2026
Uber logo
Uber
Medium
Software Engineer

Build a QuadTree From a Grid

Implement a compressed QuadTree for a square grid. You are given an n x n grid of values, where n is a power of two. The values are not limited to bin...

Coding & Algorithms
0
0
7 people solved
Apr 18, 2026
Microsoft logo
Microsoft
Medium
Software Engineer

Sort Three Categories In Place

You are given an array items containing only the values 0, 1, and 2, where each value represents a category. Rearrange the array in-place so that all ...

Coding & Algorithms
0
0
8 people solved
Apr 18, 2026
Microsoft logo
Microsoft
Medium
Machine Learning Engineer

Implement K-Means and Detect Divisible Subarrays

Solve both coding tasks. Part A: Implement K-Means Clustering Implement K-means clustering for a set of points. Given: - points: a list of n points, w...

Coding & Algorithms
1
0
16 people solved
Apr 18, 2026
Databricks logo
Databricks
Medium
Machine Learning EngineerSenior+

Design In-Memory QPS Counter

Implement an in-memory traffic counter. You need to support two operations for each logical key, such as an endpoint, customer, or service name: - rec...

Coding & Algorithms
12
0
93 people solved
Apr 18, 2026
Bytedance logo
Bytedance
Easy
Software Engineer

Equalize Root-to-Leaf Sums in an N-ary Tree

Equalize Root-to-Leaf Sums in an N-ary Tree You are given a rooted tree. Node i has nonnegative value values[i]. In one operation, you may increase on...

Coding & Algorithms
0
0
10 people solved
Apr 17, 2026
Uber logo
Uber
Hard
Software Engineer

Determine Whether a Word Exists in a Character Grid

Given a 2D character grid and a word, return whether the word can be formed by moving horizontally or vertically between adjacent cells without reusin...

Coding & Algorithms
0
0
12 people solved
Apr 17, 2026
Uber logo
Uber
Hard
Software Engineer

Maintain the First Value That Appears Exactly Once

Design a data structure that maintains a stream of integers and returns the first value that appears exactly once. Implement: `python class FirstUniqu...

Coding & Algorithms
0
0
1 people solved
Apr 17, 2026
Box logo
Box
Easy
Software Engineer

Implement a Leaky Bucket Rate Limiter

Implement a leaky bucket rate limiter. You are given a class template for a rate limiter that controls whether incoming requests should be accepted or...

Coding & Algorithms
1
0
5 people solved
Apr 17, 2026
Microsoft logo
Microsoft
Medium
Software Engineer

Retain Top K Elements

Given a list of integers nums and an integer k, return a new list formed from the original list after removing every element except the k largest elem...

Coding & Algorithms
1
0
12 people solved
Apr 17, 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