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
Optiver logo
Optiver
Medium
Data Scientist

Minimize moves to transform floor layouts

You are given an initial arrangement of apartments across Floors 1–4 and a target arrangement. In one move you may reposition a single apartment to a ...

Coding & Algorithms
4
0
80 people solved
Sep 6, 2025
Citi logo
Citi
Medium
Software Engineer

Explain data structure fundamentals

Explain how a hash map works internally: hashing, collision resolution strategies (separate chaining vs. open addressing), load factor, and resizing. ...

Coding & Algorithms
7
0
73 people solved
Sep 6, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Implement tree traversals, BFS, and subsets generation

1) Define a TreeNode class for a binary tree with an integer value and left/right pointers. Implement preorder, inorder, and postorder traversals: (a)...

Coding & Algorithms
5
0
75 people solved
Sep 6, 2025
Apple logo
Apple
Medium
Software Engineer

Implement deep clone for complex objects

Implement a deep-clone function for nested objects in JavaScript (or a language of your choice) without using JSON serialization or third-party librar...

Coding & Algorithms
10
0
97 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Compute rooms and verify tree completeness

This question has two independent algorithm problems on a single calendar/tree theme. Treat each Part as a self-contained coding exercise: implement a...

Coding & Algorithms
2
0
44 people solved
Sep 6, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Compute split-stay listing pairs

Given a set of Airbnb listings, each with availability represented as a sorted list of day integers, and a requested inclusive date range [S, E], comp...

Coding & Algorithms
55
0
539 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Optimize with a cache/hash map

Question This is a follow-up to your existing implementation (for example, a script that repeatedly resolves file paths or parses license strings into...

Coding & Algorithms
4
0
84 people solved
Sep 6, 2025
Stripe logo
Stripe
Medium
Software Engineer

Plan bicycle routes on a city map

You are given a city bicycle network as a weighted graph where edges encode distance, bike-lane availability, elevation gain, and traffic risk. Comput...

Coding & Algorithms
31
0
357 people solved
Sep 6, 2025
Rippling logo
Rippling
Medium
Software EngineerSenior+ AI

Implement a balance tracker and interval merger

This screening contained two coding exercises. Part 1: Driver balance tracker You are building an in-memory ledger for a delivery platform. Each updat...

Coding & Algorithms
9
0
92 people solved
Mar 10, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Identify members lacking specialty coverage

Identify members lacking specialty coverage Oscar wants to ensure that every insurance member has adequate access to in-network healthcare providers w...

Coding & Algorithms
10
0
72 people solved
Jul 28, 2025
eBay logo
eBay
Medium
Software Engineer Locked

Find K most frequent elements

This question evaluates a candidate's ability to implement efficient frequency counting and selection logic, demonstrating understanding of data struc...

Coding & Algorithms
5
0
54 people solved
Jan 15, 2026
Rillet logo
Rillet
Medium
Backend Engineer

Distribute Annual Revenue Across Twelve Months

Distribute Annual Revenue Across Twelve Months Implement distribute_revenue(annual_cents). The input is a non-negative integer amount of annual revenu...

Coding & Algorithms
1
0
11 people solved
May 12, 2026
Uber logo
Uber
Medium
Data Scientist

Design airport dispatch with ETA uncertainty

You control airport pickups with streaming ETAs for arriving flights and live driver locations/queues. Design an online dispatch algorithm that minimi...

Coding & Algorithms
15
0
103 people solved
Oct 13, 2025
Waymo logo
Waymo
Medium
Machine Learning Engineer

Debug Tensor Conversion Bugs

You are given a small tensor utility library used in distributed numerical code. The implementation has several bugs related to aliasing, array conver...

Coding & Algorithms
2
0
19 people solved
Nov 27, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute dasher pay from order event logs

You are given a list of delivery-order event records for a single dasher. Each record contains: - order_id - event_type in {CREATED, ACCEPTED, PICKED_...

Coding & Algorithms
46
0
326 people solved
Jan 14, 2026
Meta logo
Meta
Easy
Software Engineer

Solve palindrome-check and vertical-order traversal

You are asked to solve two separate coding questions. You do not need to run code; be prepared to explain your approach and walk through examples. Que...

Coding & Algorithms
2
0
40 people solved
Oct 13, 2025
Waymo logo
Waymo
Medium
Frontend EngineerSenior+

Filter Matching Subtrees from an N-Ary Tree

Filter Matching Subtrees from an N-Ary Tree Remove every node whose string value contains a given substring. Removing a node also removes its entire d...

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

Count Islands After Land Additions

This question evaluates understanding of dynamic connectivity, incremental graph updates, and algorithmic efficiency when maintaining connected compon...

Coding & Algorithms
1
0
15 people solved
May 11, 2026
Amazon logo
Amazon
Hard
Software Engineer

Minimize Branch Merge Conflicts

You are given several feature branches that must all be merged into the main branch. Each branch contains a sequence of commits, and each commit modif...

Coding & Algorithms
11
0
179 people solved
Jan 12, 2026
TikTok logo
TikTok
Medium
Software EngineerIntern Locked

Reconstruct a binary tree from traversals

This question evaluates understanding of binary tree traversal properties, data structure manipulation, and algorithmic complexity involved in reconst...

Coding & Algorithms
4
0
34 people solved
Jan 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