Coding & Algorithms Interview Questions

Practice 3,429 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.4k Questions 368 Companies08.11.2026
Showing 20 results
Role
Anthropic logo
Anthropic
Hard
Software Engineer

Convert Stack Samples into Trace Events

Convert Stack Samples into Trace Events The source reports converting sampled call stacks into trace events but does not provide the exact tuple forma...

Coding & Algorithms
2
0
36 people solved
Jul 8, 2026
Glean logo
Glean
Medium
Software Engineer

Restore an Array with One Displaced Element

Restore an Array with One Displaced Element An integer array was originally sorted in nondecreasing order. It was then changed by removing at most one...

Coding & Algorithms
3
0
29 people solved
Jul 2, 2026
Harvey logo
Harvey
Medium
Software Engineer Locked

Implement an Integer Spreadsheet with Formulas

Implement an in-memory integer spreadsheet with literals, additive formulas, nested references, replacement updates, and zero-valued unset cells. Each...

Coding & Algorithms
1
0
29 people solved
Jun 6, 2026
Visa logo
Visa
Medium
Software EngineerSenior+

Find the Minimum Edge Score on a Path Between Two Cities

Find the Minimum Edge Score on a Path Between Two Cities An undirected road network contains n cities numbered from 1 through n. Each road is represen...

Coding & Algorithms
3
0
22 people solved
Jul 9, 2026
Jump Trading logo
Jump Trading
Easy
Software Engineer

Largest Subset With Positive Bitwise AND

Problem Implement largest_positive_and_subset(nums). Choose a nonempty subset of the given nonnegative integers. The subset is valid when the bitwise ...

Coding & Algorithms
0
0
14 people solved
Jun 14, 2026
Amazon logo
Amazon
Medium
Software EngineerSenior+ Locked

Compute the Median After Each Stream Insertion

Compute the median after every insertion into an integer stream without repeatedly sorting the full prefix. Practice maintaining balanced data structu...

Coding & Algorithms
2
0
25 people solved
May 29, 2026
Databricks logo
Databricks
Hard
Software Engineer

Implement a Snapshot Set Iterator

Design and implement a set data structure that supports snapshot iteration. The set stores unique values. It must support the following operations: - ...

Coding & Algorithms
21
0
181 people solved
Apr 12, 2026
Bloomberg logo
Bloomberg
Hard
Software EngineerSenior+

Detect Recent Duplicate Records with Bounded Memory

Detect Recent Duplicate Records with Bounded Memory A time-ordered stream contains records [id, text, title, timestamp]. Detect records whose exact (t...

Coding & Algorithms
2
0
24 people solved
Jul 1, 2026
Google logo
Google
Medium
Software Engineer

Find A Threshold-Limited Path With Minimum Required Safety

You are given an undirected graph with n nodes, a list of weighted edges, a start node, an end node, and a safety threshold. Each edge has a safety co...

Coding & Algorithms
9
1
43 people solved
Jul 6, 2026
Google logo
Google
Easy
Software Engineer Locked

Implement string formatting and request tracking tasks

This multi-part question evaluates string manipulation, numeric formatting, character-mapping validation under 180° rotation, and event-tracking/order...

Coding & Algorithms
31
0
264 people solved
Feb 11, 2026
Glean logo
Glean
Medium
Software Engineer Locked

Implement a Byte Pair Encoding (BPE) Tokenizer

This question evaluates practical understanding of tokenization algorithms and string processing, specifically the iterative merge-based approach used...

Coding & Algorithms
2
0
25 people solved
Jun 14, 2026
Databricks logo
Databricks
Medium
Software EngineerSenior+

Check Whether Two Strings Are Anagrams

Problem Implement are_anagrams(a, b). Return true exactly when a and b contain the same lowercase English letters with the same multiplicities, possib...

Coding & Algorithms
2
0
31 people solved
Apr 7, 2026
Valon Mortgage logo
Valon Mortgage
Hard
Software Engineer

Implement an in-memory SQL-like table

Implement a simplified in-memory SQL-like database for a single table. You should support the following operations on a table with a fixed schema (a l...

Coding & Algorithms
13
0
236 people solved
Feb 17, 2026
Pinterest logo
Pinterest
Medium
Software Engineer

Settle debts with minimal transactions

You are given a list of debts among a set of people, expressed as triples (debtor, creditor, amount) (equivalently (payer, payee, amount)), where each...

Coding & Algorithms
38
0
392 people solved
Sep 6, 2025
Datadog logo
Datadog
Easy
Software Engineer

Implement buffered file writer with concurrency support

You are given a simple file writer class that writes data directly to disk: `cpp class FileWriter { public: // Append data to the file on disk imm...

Coding & Algorithms
68
0
726 people solved
Dec 2, 2025
OpenAI logo
OpenAI
Hard
Software Engineer Locked

Aggregate Recent Message Events And Active Chats

Prepare for a stateful event aggregation coding prompt over chat events and active chats in a rolling five-minute window. The question is useful for d...

Coding & Algorithms
65
1
432 people solved
Jun 5, 2026
Bytedance logo
Bytedance
Medium
Software Engineer

Remove Duplicate Letters Lexicographically

Remove Duplicate Letters Lexicographically Given a lowercase string, remove repeated occurrences so that every distinct letter appears exactly once. T...

Coding & Algorithms
1
0
14 people solved
Jul 9, 2026
Mixpanel logo
Mixpanel
Medium
Software Engineer

Group Events by an Ordered Attribute List

Group Events by an Ordered Attribute List Problem Implement groupEventCounts(fieldNames, events, groupBy) -> resultJson. Each row in events is a porta...

Coding & Algorithms
2
0
16 people solved
May 11, 2026
Zoox logo
Zoox
Medium
Software Engineer

Three Array Problems for Trading Geometry and Grouping

Problem Implement solve(prices, numbers, people, group_size) and return an object with three fields. 1. max_profit: the maximum profit from buying onc...

Coding & Algorithms
1
0
21 people solved
May 11, 2026
Voleon logo
Voleon
Medium
Software Engineer Locked

Advance Cyclic Ball Flips Efficiently

Determine ball colors after many synchronized marker moves around a circle, where marked positions flip before advancing. Derive an O(n + m) parity so...

Coding & Algorithms
3
0
22 people solved
Jun 26, 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