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

Explain Java volatile semantics

Explain Java volatile semantics What does the volatile keyword guarantee in Java's memory model? Describe visibility, ordering (happens-before), and r...

Coding & Algorithms
3
0
48 people solved
Aug 7, 2025
Meta logo
Meta
Medium
Software Engineer

Group a tree by vertical columns

Group a tree by vertical columns Given the root of a binary tree, produce a vertical listing of nodes: assign each node an x-coordinate (root at x=0; ...

Coding & Algorithms
2
0
32 people solved
Aug 7, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Debug round-robin, DashMap, and simple cache

You are given a service that routes requests to a list of nodes, each marked as either available or unavailable. The pickNode() function is intended t...

Coding & Algorithms
97
0
751 people solved
Aug 7, 2025
Meta logo
Meta
Medium
Software Engineer

Solve sliding window and tree BFS

Solve sliding window and tree BFS Solve a typical medium-level sliding-window problem (e.g., longest substring without repeating characters). LeetCode...

Coding & Algorithms
5
0
51 people solved
Aug 4, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Manage GPU Credits with Expiration

Question Implement a GPU credit manager supporting out-of-order operations: API add_credit(id, amount, timestamp, expiration) // adds ‘amount’ credit...

Coding & Algorithms
38
0
400 people solved
Aug 4, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Implement persistent key-value store

Question Design and implement an in-memory key-value store supporting set(key, value), get(key), shutdown() that flushes all data as bytes to a medium...

Coding & Algorithms
22
0
299 people solved
Aug 4, 2025
Instacart logo
Instacart
Medium
Software Engineer

Pivot order-status counts

Pivot order-status counts Given an orders table (order_id, shopper_id, order_date, status, …), pivot the data so that each row is one shopper and each...

Coding & Algorithms
8
0
105 people solved
Aug 4, 2025
Capital One logo
Capital One
Medium
Data Scientist

Validate Unit-Test Coverage and Identify Missing Scenarios

Validate Unit-Test Coverage and Identify Missing Scenarios Scenario Tech round: reviewing an existing unit-test that exercises the class from Part 2 Q...

Coding & Algorithms
6
0
82 people solved
Aug 4, 2025
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Implement Time-Aware GPU Credit Ledger

This question evaluates the ability to design efficient data structures and algorithms for time-aware resource accounting, including handling overlapp...

Coding & Algorithms
5
0
62 people solved
Feb 23, 2026
Snapchat logo
Snapchat
Hard
Software Engineer Locked

Implement a Leaky Bucket Limiter

This question evaluates understanding of rate-limiting algorithms (leaky bucket), concurrent programming, time-based state management, and thread-safe...

Coding & Algorithms
4
0
35 people solved
Feb 23, 2026
Amazon logo
Amazon
Easy
Data Engineer

Solve Two String Problems

You are asked to solve the following two coding problems: 1. Unique Morse Code Transformations You are given an array of lowercase English words, word...

Coding & Algorithms
19
0
150 people solved
Feb 23, 2026
Scale AI logo
Scale AI
Medium
Software Engineer

Update a Neuron Grid

You are given an m x n integer matrix neurons. - A cell is a firing neuron if its value is 0. - A cell is a non-firing neuron if its value is greater ...

Coding & Algorithms
9
1
180 people solved
Feb 22, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Implement Calendar, Tokenizer, and Meeting Optimizer

This question evaluates competencies in interval scheduling and overlap detection, custom string tokenization and parsing rules, and combinatorial opt...

Coding & Algorithms
4
0
77 people solved
Feb 22, 2026
Mavenclinic logo
Mavenclinic
Medium
Software Engineer Locked

Solve two interview coding problems

This question evaluates graph traversal and pathfinding with weighted edge composition for currency conversion reachability, and sequence partitioning...

Coding & Algorithms
3
0
35 people solved
Feb 22, 2026
Google logo
Google
Hard
Machine Learning Engineer

Can you reach target with distance-threshold edges?

You are given a set of unordered 2D points points[], a start point and an end point (both are included in points), and a function: `text getDistance(p...

Coding & Algorithms
11
1
181 people solved
Feb 22, 2026
Akuna Capital logo
Akuna Capital
Medium
Software Engineer

Trace code and find frequent character

Trace code and find frequent character 1) Trace a simple algorithm: Given a short loop-and-conditional pseudo-code operating over an integer array, tr...

Coding & Algorithms
3
0
51 people solved
Aug 1, 2025
Bank of America logo
Bank of America
Medium
Data Scientist

Explain coding solution and alternatives

Explain coding solution and alternatives Explain the logic behind your solution to a previous coding problem (e.g., the second coding task in this int...

Coding & Algorithms
4
0
65 people solved
Aug 1, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Detect duplicate files by content

Detect duplicate files by content in a filesystem. Given access to a directory tree, return groups of file paths that have identical byte content. Min...

Coding & Algorithms
12
0
188 people solved
Aug 1, 2025
Fidelity logo
Fidelity
Medium
Software Engineer

Solve concurrency in Java

Solve concurrency in Java How do you handle concurrency in Java? Compare threads, the Executor framework, synchronized blocks, explicit locks, atomic ...

Coding & Algorithms
6
0
50 people solved
Jul 31, 2025
Fidelity logo
Fidelity
Medium
Software Engineer

Describe Angular features

Describe Angular features What are the key features of Angular? Discuss modules, components, templates, dependency injection, change detection, RxJS o...

Coding & Algorithms
5
0
43 people solved
Jul 31, 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