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

Design a text editor with undo/redo

Design and implement a text document editor that maintains a single string of content and supports undo/redo of edits. Model each edit using the Comma...

Coding & Algorithms
65
0
590 people solved
Aug 13, 2025
Marshall Wace logo
Marshall Wace
Medium
Software Engineer

Compute max events in any 60-second window

Design a function that, given a non-decreasing list of integer timestamps (seconds), returns the maximum number of events occurring within any contigu...

Coding & Algorithms
10
0
84 people solved
Aug 13, 2025
Pinterest logo
Pinterest
Medium
Software Engineer

Solve set equality and ad log top‑K

Problem Set (Coding) 1) Check whether two sets are equal You are given two integer arrays A and B that represent sets, except they may contain duplica...

Coding & Algorithms
19
0
198 people solved
Nov 11, 2025
Oracle logo
Oracle
Medium
Software Engineer

Find users with at least one valid session

You are given: - A list of log entries logs, where each entry is a string in the format: ` "userId action timestamp" ` - userId is a non...

Coding & Algorithms
6
0
58 people solved
Nov 11, 2025
Affirm logo
Affirm
Hard
Software Engineer Locked

Compute Balances and Minimize Settlements

This question evaluates transactional data aggregation and net-balance computation skills alongside combinatorial optimization for minimizing settleme...

Coding & Algorithms
10
0
84 people solved
Feb 27, 2026
Meta logo
Meta
Easy
Machine Learning EngineerSenior+ Locked

Solve Tree Views, Columns, and Calculator

This multi-part question evaluates skills in binary tree traversal and view extraction, vertical column grouping and ordering of tree nodes, and parsi...

Coding & Algorithms
3
0
35 people solved
Feb 27, 2026
Anthropic logo
Anthropic
Medium
Machine Learning Engineer Locked

Implement an LRU cache

This question evaluates competency in designing efficient key-value caching mechanisms, enforcing capacity constraints and eviction policies while mai...

Coding & Algorithms
22
0
349 people solved
Feb 27, 2026
Stripe logo
Stripe
Medium
Software Engineer

Design a subscription email scheduler with changes and renewals

Implement an email notification scheduler for subscription accounts. Inputs: - send_schedule: a mapping whose keys include: • "start": label to send...

Coding & Algorithms
4
0
36 people solved
Aug 12, 2025
Robinhood logo
Robinhood
Medium
Software Engineer

Design a referral leaderboard with chain-based counts

Design and implement a function that generates a referral leaderboard for a platform, given two equal-length arrays rh_users and new_users representin...

Coding & Algorithms
20
0
229 people solved
Aug 12, 2025
Reddit logo
Reddit
Medium
Software Engineer

Implement a sliding-window rate limiter

Problem Design and implement an in-memory rate limiter using a sliding time window. You are given a stream of requests. Each request has: - key (e.g.,...

Coding & Algorithms
11
0
128 people solved
Nov 10, 2025
Robinhood logo
Robinhood
Medium
Software Engineer

Count Referral Descendants

You are building a referral analytics feature. Each referral relationship is represented as a directed pair (referrer, referredUser), meaning referrer...

Coding & Algorithms
16
0
128 people solved
Feb 26, 2026
Chime logo
Chime
Medium
Backend Engineer Locked

Solve classic backend coding problems

This multi-part question evaluates algorithmic problem solving and implementation skills, including string parsing and segmentation, combinatorial rea...

Coding & Algorithms
6
0
113 people solved
Feb 26, 2026
Two Sigma logo
Two Sigma
Medium
Data Scientist

Implement merge sort and largest 1-rectangle

The coding round included two algorithm questions: 1. Implement merge sort for an array of integers. Return the sorted array and explain its time and ...

Coding & Algorithms
7
0
53 people solved
Feb 26, 2026
Snapchat logo
Snapchat
Medium
Software Engineer

Implement XML tokenizer and parser with operations

Implement XML tokenizer and parser with operations You are given either (a) a raw XML-like string such as <catalog><book><author>Gambardella, Matthew<...

Coding & Algorithms
3
0
67 people solved
Aug 10, 2025
Perplexity AI logo
Perplexity AI
Medium
Software Engineer

Design a CreditTracker with expirations

Design a CreditTracker class with three methods: ( 1) add_credit(start_time, end_time, credit), ( 2) subtract_credit(time, credit), and ( 3) check_cre...

Coding & Algorithms
14
0
127 people solved
Aug 10, 2025
NVIDIA logo
NVIDIA
Medium
Software Engineer

Design an IR for test workflows

Design an IR for test workflows Design an intermediate representation (IR) for a graphics testing workflow as a DAG. Define node/edge types, metadata,...

Coding & Algorithms
5
0
62 people solved
Aug 9, 2025
Waymo logo
Waymo
Medium
Software Engineer Locked

Serialize Expression Tree Minimizing Parentheses

This question evaluates proficiency with binary expression trees, operator precedence and associativity, and the ability to serialize an abstract synt...

Coding & Algorithms
6
0
65 people solved
Feb 25, 2026
Goldman Sachs logo
Goldman Sachs
Medium
Software Engineer

Implement an Integer Hash Map

Design a data structure MyHashMap that stores integer keys and integer values without using any built-in hash table library. Implement the following o...

Coding & Algorithms
5
0
63 people solved
Feb 25, 2026
Google logo
Google
Medium
Software Engineer

Find largest subset sharing a common digit

You are given an array nums of length N (1 ≤ N ≤ 100). Every element is a two-digit integer between 10 and 99 (inclusive). Select as many elements as ...

Coding & Algorithms
9
0
103 people solved
Feb 25, 2026
PayPal logo
PayPal
Medium
Software Engineer

Explain AtomicInteger and ABA problem

Explain AtomicInteger and ABA problem How does AtomicInteger implement atomic updates (e.g., via CAS using Unsafe or VarHandles)? What is the ABA prob...

Coding & Algorithms
4
0
52 people solved
Aug 7, 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