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

Implement Document Predicate APIs

Design a simple document service that stores text documents identified by filename. Implement these APIs: - InsertDoc(filename, content): store or ove...

Coding & Algorithms
10
1
80 people solved
Apr 12, 2026
Airbnb logo
Airbnb
Medium
Software Engineer Locked

Determine Exact Layover Booking

This question evaluates a candidate's competency in algorithmic problem solving, numerical precision handling, and combinatorial selection under exact...

Coding & Algorithms
59
1
412 people solved
Apr 12, 2026
Google logo
Google
Medium
Software Engineer

Maximize Boundary-Difference Subarray Sum

Given an integer array nums and an integer k, find the maximum possible sum of a non-empty contiguous subarray whose first and last elements differ by...

Coding & Algorithms
3
0
20 people solved
Apr 11, 2026
Hudson logo
Hudson
Easy
Machine Learning Engineer

Count People Reaching the Boundary

You are given a 1-dimensional line segment with a right boundary at position L. There are N people with initial positions p1, p2, ..., pN, and there i...

Coding & Algorithms
3
0
26 people solved
Apr 11, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Build a File-Backed Key-Value Store

This question evaluates a candidate's understanding of persistent key-value storage, in-memory versus on-disk state management, serialization/deserial...

Coding & Algorithms
6
0
63 people solved
Apr 11, 2026
Warp logo
Warp
Medium
Software Engineer

Implement Terminal Tabs and Split Panels

Implement a data structure that models a terminal application with multiple tabs and split panels. Requirements: - A Terminal can create and store mul...

Coding & Algorithms
0
0
3 people solved
Apr 10, 2026
OpenAI logo
OpenAI
Easy
Software Engineer

Implement Chat Event Counter

Design an in-memory counter for chat activity. You need to implement a class with the following two methods: `text processEvent(userId: string, chatId...

Coding & Algorithms
2
0
24 people solved
Apr 10, 2026
Uber logo
Uber
Medium
Data ScientistSenior+

Find the Next Larger Palindrome

Given a positive integer n, return the smallest integer strictly greater than n whose decimal representation is a palindrome. A palindrome reads the s...

Coding & Algorithms
2
0
24 people solved
Apr 10, 2026
Microsoft logo
Microsoft
Medium
Software EngineerSenior+

Implement SQL Table and DNA Ordering

Two independent coding exercises were asked. Solve both. Problem A: CSV-backed in-memory table Build a tiny in-memory relational table initialized fro...

Coding & Algorithms
2
0
27 people solved
Apr 10, 2026
Faire logo
Faire
Medium
Software Engineer

Print a Centered Pascal Triangle

Given a positive integer height, generate the first height rows of Pascal's triangle and print them as a centered text triangle. Formatting requiremen...

Coding & Algorithms
1
0
27 people solved
Apr 10, 2026
Notion logo
Notion
Medium
Data Engineer Locked

Implement a DAG task graph

This question evaluates competency with directed acyclic graphs, graph algorithms (topological sorting), dependency modeling, and implementing data st...

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

Simulate and Construct Tournament Rankings

You are given a single-elimination tournament represented by an array of ranks. The array is a permutation of the integers 1..n, where a smaller numbe...

Coding & Algorithms
1
0
13 people solved
Apr 9, 2026
Amazon logo
Amazon
Medium
Software Engineer

Solve Union-Find, Graph, and Stream Problems

Solve the following independent coding problems. 1. Merge Product Categories You are given a list of tuples (productA, productB). Each tuple means the...

Coding & Algorithms
0
0
6 people solved
Apr 9, 2026
Pinterest logo
Pinterest
Medium
Software Engineer

Assign Pins to Shortest Columns

You are given a list of pins, where each pin has a height, and a fixed number of columns in a masonry-style layout. Process the pins in their original...

Coding & Algorithms
0
0
11 people solved
Apr 9, 2026
Modular logo
Modular
Hard
Software Engineer

Find the Critical Path

You are given a project represented as a directed acyclic graph of tasks. Each task has: - a unique task name - a list of prerequisite task names - a ...

Coding & Algorithms
0
0
10 people solved
Apr 9, 2026
Sigmacomputing logo
Sigmacomputing
Medium
Software Engineer

Build a Pivot Table Aggregator

Implement a function that builds a pivot table from a list of records. Each record contains a row_key, a column_key, and a numeric value. Requirements...

Coding & Algorithms
2
0
22 people solved
Apr 9, 2026
Airbnb logo
Airbnb
Medium
Software Engineer

Solve Linked-List and Iterator Problems

You are asked to solve two coding problems. Problem 1: Detect shared nodes between possibly cyclic linked lists You are given the heads of two singly ...

Coding & Algorithms
10
0
99 people solved
Apr 8, 2026
Waymo logo
Waymo
Medium
Software Engineer

Find Shortest Paths to Target Nodes

You are given a weighted directed graph representing distances between nodes. - There are n nodes labeled from 0 to n - 1. - edges[i] = [u, v, w] mean...

Coding & Algorithms
3
0
28 people solved
Apr 8, 2026
Uber logo
Uber
Medium
Software Engineer

Solve two interview coding problems

The interview included two coding problems. Problem 1: Find valid robot locations in a grid You are given a 2D grid containing empty cells and obstacl...

Coding & Algorithms
4
0
33 people solved
Apr 8, 2026
Meta logo
Meta
Medium
Software EngineerSenior+ AI

Infer an Unknown Alphabet Order

You are given a list of words that is already sorted according to an unknown alphabet. Derive one valid ordering of the characters in that alphabet. R...

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