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

Implement image carousel with comments and upvotes

Implement an image carousel that supports: 1) cycling forward/backward and autoplay with a configurable interval; 2) a per-image comment thread with c...

Coding & Algorithms
5
0
81 people solved
Sep 6, 2025
Hudson logo
Hudson
Easy
Software EngineerIntern

Check Root-To-Leaf Target Sums In A Binary Tree

You are given the root of a binary tree and an integer target. Each node contains an integer value. Return true if there is at least one path from the...

Coding & Algorithms
0
0
8 people solved
Jul 3, 2026
Optiver logo
Optiver
Hard
Software Engineer

Detect Currency Arbitrage After a Cycle Fee

Detect Currency Arbitrage After a Cycle Fee You are given a matrix of positive currency exchange rates, where rates[i][j] units of currency j are rece...

Coding & Algorithms
0
0
3 people solved
May 3, 2026
Optiver logo
Optiver
Hard
Software Engineer

Count Bounded Buy-and-Sell Sequences

Count Bounded Buy-and-Sell Sequences You start with k shares. On each transaction day, you either buy one share or sell one share, but holdings may ne...

Coding & Algorithms
0
0
3 people solved
May 3, 2026
Vanta logo
Vanta
Medium
Software Engineer

Order Classes by Prerequisites with Recursive DFS

Order Classes by Prerequisites with Recursive DFS Implement class_order(classes, prerequisites) using recursive depth-first search. classes contains d...

Coding & Algorithms
1
0
15 people solved
May 3, 2026
OpenAI logo
OpenAI
Hard
Machine Learning Engineer Locked

Schedule Incremental Labeling Tasks

This question evaluates skills in designing stateful incremental schedulers, fairness and load-balancing algorithms, deterministic tie-breaking, and e...

Coding & Algorithms
12
0
116 people solved
Apr 8, 2026
Exoduspoint logo
Exoduspoint
Medium
Software Engineer

Find minimal time for four people crossing

Assume there are four people who need to cross a narrow bridge at night using a single flashlight. - Each person \(i\) requires a different, known amo...

Coding & Algorithms
5
0
77 people solved
Dec 8, 2025
BlackRock logo
BlackRock
Easy
Software Engineer

Design paint editor with undo/redo

Implement a simplified Paint editor that supports drawing on a 2D canvas and reverting changes using undo and redo operations. Canvas You are given a ...

Coding & Algorithms
8
0
86 people solved
Dec 8, 2025
Anthropic logo
Anthropic
Medium
Machine Learning Engineer Locked

Convert Samples into Event Intervals

This question evaluates understanding of array and sequence processing, run-length encoding concepts, and interval representation for time-ordered tra...

Coding & Algorithms
15
0
94 people solved
Apr 7, 2026
Mercor logo
Mercor
Medium
Machine Learning Engineer Locked

Implement a Referral Network

This question evaluates skills in modeling and manipulating directed acyclic graphs, implementing graph-based ranking metrics (reachability and flow c...

Coding & Algorithms
3
0
38 people solved
May 2, 2026
Amazon logo
Amazon
Easy
Software Engineer Locked

Find Unique Target-Sum Pairs

This question evaluates array-processing skills, correctness in handling duplicate values, and the ability to identify unique value pairs whose sums m...

Coding & Algorithms
2
0
25 people solved
May 2, 2026
Rippling logo
Rippling
Medium
Software Engineer Locked

Implement an In-Memory File System

This question evaluates understanding of file-system abstractions, tree-based data structures, path parsing, and stateful directory and file managemen...

Coding & Algorithms
1
1
19 people solved
May 30, 2026
Upstart logo
Upstart
Medium
Software EngineerSenior+ Locked

Find Maximum Eastbound City Visits and Parse CSV

The first problem evaluates algorithmic reasoning about ordering constraints and subsequence selection, testing skills in sequence algorithms, multidi...

Coding & Algorithms
2
0
18 people solved
May 30, 2026
Coinbase logo
Coinbase
Medium
Software Engineer

Implement custom iterators and interfaces

Implement custom iterators and interfaces Define a minimal Iterator interface (e.g., hasNext(), next()) for integers without using IDE-generated scaff...

Coding & Algorithms
15
0
135 people solved
Jul 31, 2025
Nuro logo
Nuro
Medium
Software Engineer

Generate Weighted Random Keys With Add And Remove

Design a class that stores string keys with positive integer weights. add_key(key, weight) inserts or updates a key. generate() returns one key random...

Coding & Algorithms
5
0
51 people solved
Jul 2, 2026
Block (Square) logo
Block (Square)
Medium
Data Scientist

Build referral chains and detect cycles

You are given a directed referral graph where each user may have at most one referrer. Input file 'referrals.csv' has columns: user_id (INT), referred...

Coding & Algorithms
10
0
86 people solved
Oct 13, 2025
Point72 logo
Point72
Hard
Data Engineer

Implement Portfolio Trading Optimizer

You are given an array prices, where prices[i] is the price of one stock on day i. You may perform multiple buy/sell transactions over the period, but...

Coding & Algorithms
2
0
30 people solved
Apr 30, 2026
Bytedance logo
Bytedance
Medium
Data Engineer Locked

Find Top Creators and Login Streaks

This question evaluates proficiency in data aggregation, algorithmic optimization for top-k retrieval, and SQL time-series analysis using window funct...

Coding & Algorithms
3
0
59 people solved
Mar 12, 2026
Meta logo
Meta
Hard
Data Engineer

Write SQL for car rental utilization by city

SQL / Data Query Prompt (Car Rental) You are given four tables: user - user_id location - location_id - city car - car_id - car_size (e.g., compact, m...

Coding & Algorithms
12
2
183 people solved
Dec 1, 2025
Google logo
Google
Medium
Software Engineer

Check if all substrings are anagrams of words

You are given a string s (letters only) and access to an English dictionary dict (a set of valid words). Return true if every contiguous substring of ...

Coding & Algorithms
60
0
564 people solved
Mar 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