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

Maintain the Median of a Data Stream

Maintain the Median of a Data Stream Process a stream of integers and return the median after every insertion. For an odd number of values, the median...

Coding & Algorithms
0
0
1 people solved
Jul 22, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Implement consistent hashing ring

Implement consistent hashing ring Implement consistent hashing for routing keys to servers. Provide APIs addNode(nodeId, weight), removeNode(nodeId), ...

Coding & Algorithms
17
0
139 people solved
Aug 9, 2025
Hebbia logo
Hebbia
Hard
Software Engineer

Detect a Winner on a 3x3 Tic-Tac-Toe Board

Detect a Winner on a 3x3 Tic-Tac-Toe Board Implement tic_tac_toe_winner(board) for a completed or partially completed 3x3 board. Each cell is "X", "O"...

Coding & Algorithms
0
0
4 people solved
Jun 6, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Palindrome After Deleting at Most One Character

This question evaluates a candidate's ability to reason about two-pointer string traversal and palindrome verification under a single edit constraint....

Coding & Algorithms
1
0
15 people solved
Jun 20, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Return Top K Open Businesses

This question evaluates a candidate's ability to perform filtering and multi-criteria ranking, requiring correct handling of an open-status filter and...

Coding & Algorithms
8
0
97 people solved
May 10, 2026
Qualcomm logo
Qualcomm
Medium
Software Engineer

Find the First Bad Version in a Monotonic Release History

Find the First Bad Version in a Monotonic Release History You are given a release history as a boolean array bad. Versions use zero-based indices. Onc...

Coding & Algorithms
1
0
13 people solved
Apr 16, 2026
Grammarly logo
Grammarly
Medium
Software Engineer Locked

Reverse a Singly Linked List

Reverse a finite singly linked list represented by nested two-item Python lists. Reuse the existing node objects without allocating replacements, and ...

Coding & Algorithms
3
0
16 people solved
Jun 19, 2026
Applied logo
Applied
Hard
Software Engineer

Merge Overlapping Collinear Segments

You are given a list of 2D geometric segments: vector<vector<pair<double, double>>> segments Each inner list represents one segment and contains at le...

Coding & Algorithms
8
0
88 people solved
Apr 15, 2026
OpenAI logo
OpenAI
Medium
Software Engineer

Implement follow graph with snapshots and recommendations

Design and implement an in-memory “social network” component that supports following/unfollowing, point-in-time (snapshot) queries, and a simple recom...

Coding & Algorithms
40
0
570 people solved
Feb 2, 2026
Amazon logo
Amazon
Hard
Software EngineerSenior+

Implement a Half-Open Interval Range Module

Implement a Half-Open Interval Range Module Implement a module that tracks subsets of the real-number line using half-open intervals [left, right). Pr...

Coding & Algorithms
1
0
17 people solved
Jul 5, 2026
Upstart logo
Upstart
Easy
Software Engineer

Rewrite Sentence-Ending Punctuation

Rewrite Sentence-Ending Punctuation Transform a string in two conceptual steps: 1. Add one extra exclamation mark to every maximal run of existing ! c...

Coding & Algorithms
1
0
11 people solved
Jul 5, 2026
Pinterest logo
Pinterest
Medium
Machine Learning Engineer Locked

First Word Matching Each Prefix Query

This question evaluates a candidate's grasp of string data structures and efficient prefix-matching techniques, core competencies in coding and algori...

Coding & Algorithms
1
0
13 people solved
Jun 3, 2026
Bytedance logo
Bytedance
Medium
Software Engineer Locked

Reverse a Singly Linked List

This question evaluates a candidate's grasp of linked list pointer manipulation and in-place data structure transformation. It tests the ability to re...

Coding & Algorithms
2
0
16 people solved
Jun 18, 2026
Decagon logo
Decagon
Medium
Software Engineer Locked

Implement a Recipe Cart

This question evaluates the ability to design and implement stateful data structures and aggregation logic for tracking ingredient counts, applying ti...

Coding & Algorithms
6
0
45 people solved
May 20, 2026
Snowflake logo
Snowflake
Medium
Software Engineer Locked

Sort an RGB Record Collection In Place

This question evaluates a candidate's ability to implement an in-place, single-pass partitioning algorithm under strict interface constraints, commonl...

Coding & Algorithms
1
0
15 people solved
Jun 17, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer Locked

Implement streaming enrichment aggregator

This question evaluates competency in stateful stream processing, event-driven aggregation, in-memory state management, time-based expiry, and produci...

Coding & Algorithms
12
0
109 people solved
Jan 11, 2026
Atlassian logo
Atlassian
Medium
Software Engineer

Design a trie-based URL router with wildcards

Design a trie-based URL router with wildcards Implement a URL routing matcher that supports adding route patterns and matching request paths, using a ...

Coding & Algorithms
26
0
186 people solved
Jul 31, 2025
Tradedesk logo
Tradedesk
Medium
Software Engineer

Implement a Cloud Storage Service

Implement an in-memory cloud storage system. Build the class incrementally; later levels must preserve all behavior from earlier levels. File names ar...

Coding & Algorithms
3
0
29 people solved
Apr 10, 2026
Pinterest logo
Pinterest
Hard
Machine Learning Engineer

Solve a 9x9 Sudoku puzzle

Given a partially filled 9×9 Sudoku board, fill the empty cells so that the completed board is valid. A valid Sudoku satisfies: - Each row contains di...

Coding & Algorithms
18
1
138 people solved
Dec 13, 2025
Shopify logo
Shopify
Easy
Software Engineer

Implement cache and gift assignment system

You are given two independent programming problems. --- Problem 1: Implement a bounded key–value cache Design a data structure that stores key–value p...

Coding & Algorithms
36
0
367 people solved
Oct 1, 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