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

Implement a size-bounded LRU cache

This question evaluates a candidate's ability to design and implement efficient data structures for capacity-bound caching, focusing on handling varia...

Coding & Algorithms
3
0
50 people solved
Jan 2, 2026
Nuro logo
Nuro
Medium
Software Engineer Locked

Map Weighted Random Draws to Indices

Map deterministic draws to weighted indices using cumulative ranges. Support large weights and many queries while preserving draw order and respecting...

Coding & Algorithms
0
0
9 people solved
May 26, 2026
Geico logo
Geico
Hard
Software Engineer Locked

Solve Refueling and JSON Parsing Tasks

This multipart question evaluates algorithmic problem-solving and parsing competencies, specifically resource-optimization and data-structure use for ...

Coding & Algorithms
1
0
13 people solved
May 26, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Stream output until stop token appears

This question evaluates streaming string processing and pattern-matching skills, specifically handling token detection across chunk boundaries, bounda...

Coding & Algorithms
14
0
149 people solved
Feb 12, 2026
TikTok logo
TikTok
Easy
Software Engineer Locked

Find the longest palindromic substring

This question evaluates proficiency in string manipulation and algorithmic problem-solving, focusing on palindrome detection and substring handling wi...

Coding & Algorithms
6
0
58 people solved
Feb 12, 2026
Microsoft logo
Microsoft
Easy
Software Engineer

Implement interval room counter and token manager

You are given two coding questions. 1) Minimum number of rooms for time intervals You are given a list of meetings, where each meeting is an interval ...

Coding & Algorithms
185
3
2214 people solved
Feb 12, 2026
Databricks logo
Databricks
Hard
Software Engineer Locked

Determine allow/deny for an IP via CIDR rules

This question evaluates understanding of IPv4 addressing, CIDR range matching, rule ordering and precedence, and algorithmic correctness in determinin...

Coding & Algorithms
18
0
180 people solved
Feb 12, 2026
Stripe logo
Stripe
Medium
Software EngineerIntern

Simulate sticky load balancer with shutdown

Problem Implement a simulator for a load balancer that routes long-lived WebSocket connections across m backend servers. You receive a sequence of tex...

Coding & Algorithms
14
0
139 people solved
Feb 12, 2026
Applied logo
Applied
Medium
Software Engineer Locked

Find first and last occurrence in sorted array

This question evaluates proficiency in array search algorithms and algorithmic reasoning, specifically the use of binary search techniques and careful...

Coding & Algorithms
2
0
28 people solved
Feb 12, 2026
Scale AI logo
Scale AI
Easy
Machine Learning Engineer Locked

Implement multi-head attention and LLM sampling

This question evaluates implementation and conceptual understanding of Transformer multi-head scaled dot-product attention and next-token sampling for...

Coding & Algorithms
46
0
316 people solved
Feb 12, 2026
Vercel logo
Vercel
Medium
Software Engineer

Design hit counter for last 5 minutes

You are launching a new webpage and need a last-minute server-side metric to track popularity in real time. Implement a hit counter that supports the ...

Coding & Algorithms
10
0
69 people solved
Jan 1, 2026
xAI logo
xAI
Medium
Software Engineer

Contrast processes and threads

What are the differences between processes and threads? Compare memory isolation, resource ownership, scheduling, context-switch cost, inter-process c...

Coding & Algorithms
6
0
90 people solved
Aug 12, 2025
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Find minimum cycle cost per node

This question evaluates proficiency in graph algorithms and algorithmic optimization, specifically reasoning about weighted directed graphs, cycle cos...

Coding & Algorithms
6
0
68 people solved
Feb 11, 2026
Stripe logo
Stripe
Medium
Software Engineer Locked

How to settle multi-person debts in minimum transactions

This question evaluates algorithm design and combinatorial optimization skills, focusing on reasoning about net balances, transaction minimization, an...

Coding & Algorithms
6
0
94 people solved
Feb 11, 2026
Anthropic logo
Anthropic
Medium
Machine Learning Engineer Locked

Implement a web crawler using a provided API

This question evaluates understanding of web crawling mechanics, URL/hostname filtering, graph traversal concepts, and concurrent fetching, assessing ...

Coding & Algorithms
35
0
325 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Decode a JWT string without libraries

This question evaluates understanding of JWT structure, Base64URL encoding, string manipulation, and JSON parsing as applied to decoding token compone...

Coding & Algorithms
1
0
32 people solved
Feb 11, 2026
DoorDash logo
DoorDash
Hard
Software Engineer Locked

Count changed nodes between two menu trees

This question evaluates algorithmic problem-solving with tree data structures, testing competencies in hierarchical diffing, node matching by sibling ...

Coding & Algorithms
37
0
310 people solved
Feb 11, 2026
Meta logo
Meta
Medium
Software Engineer

Implement a versioned in-memory DB with CAS and history

In-Memory DB V2: TTL + Compare-And-Set/Delete + Historical Reads Implement an in-memory database keyed by (key, field) supporting TTL, conditional upd...

Coding & Algorithms
7
0
73 people solved
Feb 11, 2026
Revolut logo
Revolut
Medium
Software EngineerNew Grad

Implement a thread-safe money transfer

Problem: Implement a concurrent-safe transfer function You are given an in-memory store of bank accounts: - Each account has an accountId and a balanc...

Coding & Algorithms
11
0
163 people solved
Feb 11, 2026
Aurora logo
Aurora
Medium
Software Engineer

Compute streaming sliding-window minimums

Problem You are given an integer array nums of length n and an integer window size k. You scan nums from left to right (streaming). At each index i, y...

Coding & Algorithms
13
0
90 people solved
Feb 11, 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