Coding & Algorithms Interview Questions

Practice 3,429 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.4k Questions 368 Companies08.11.2026
Showing 20 results
Role
Harvey logo
Harvey
Hard
Software Engineer

Merge Exact-Word Highlights and Rank Their Citations

Highlight Exact Source Phrases and Attach Citations You are given a text string and an indexed list of source phrases. All input tokens are alphanumer...

Coding & Algorithms
33
0
285 people solved
Jul 27, 2026
Google logo
Google
Easy
Software Engineer

Count Rectangle Coverage on a Grid

Count Rectangle Coverage on a Grid You are given an n x n grid initially filled with zeroes and a list of inclusive rectangular updates. Each rectangl...

Coding & Algorithms
42
2
340 people solved
Jul 21, 2026
Google logo
Google
Medium
Software Engineer

Deduplicate and Order Batch and Streaming Logs

Deduplicate and Order Batch and Streaming Logs A log is (timestamp, message), where timestamp is an integer and message is compared exactly. Input ord...

Coding & Algorithms
53
1
354 people solved
Jul 14, 2026
Amazon logo
Amazon
Medium
Software EngineerSenior+

Find Paths Across a Weighted Binary Grid

Find Paths Across a Weighted Binary Grid Given an m by n binary grid, a cell with value 1 is traversable and 0 is blocked. Movement is allowed up, dow...

Coding & Algorithms
13
0
192 people solved
Jul 17, 2026
J.P. Morgan logo
J.P. Morgan
Medium
Machine Learning Engineer

Return Every Index Pair Whose Values Sum to a Target

Return Every Index Pair Whose Values Sum to a Target Problem Implement all_pairs_sum(nums, target). Given an unordered array of integers, return every...

Coding & Algorithms
5
0
41 people solved
Aug 5, 2026
Decagon logo
Decagon
Hard
Software Engineer

Count Legal Tic-Tac-Toe Games from the Empty Board

Count Legal Tic-Tac-Toe Games from the Empty Board Start with an empty 3-by-3 Tic-Tac-Toe board. X always moves first, and the players alternate placi...

Coding & Algorithms
16
0
130 people solved
Jul 17, 2026
Capital One logo
Capital One
Medium
Software Engineer

Reorder a String by Alternating Its Left and Right Ends

Reorder a String by Alternating Its Left and Right Ends Given a string text, construct a new string by taking characters in this order: 1. first chara...

Coding & Algorithms
18
3
142 people solved
Jul 21, 2026
Two Sigma logo
Two Sigma
Medium
Software Engineer

Match Limit Orders with Price-Time Priority

Implement an in-memory limit-order matcher that processes orders in arrival order and returns both the executed trades and the final resting order boo...

Coding & Algorithms
5
0
37 people solved
Jul 31, 2026
Upstart logo
Upstart
Medium
Software Engineer

Find the Minimum Absolute Difference

Find the Minimum Absolute Difference Implement minimum_absolute_difference(values). Given at least two integers, return the smallest absolute differen...

Coding & Algorithms
3
0
55 people solved
Jul 27, 2026
Airbnb logo
Airbnb
Easy
Software Engineer

Implement a Removable Nested-List Iterator

Implement a Removable Nested-List Iterator Implement an iterator over a mutable array of integer arrays. Traversal goes left to right within each inne...

Coding & Algorithms
12
0
118 people solved
Jul 14, 2026
Uber logo
Uber
Medium
Software EngineerIntern

Last Truck to Leave a One-Dimensional Lane

Last Truck to Leave a One-Dimensional Lane Implement last_exit_time(lane_length, positions, velocities). Distinct trucks start at integer positions st...

Coding & Algorithms
24
0
424 people solved
Jul 3, 2026
Google logo
Google
Medium
Software Engineer

Minimize Direction Violations in a Directed Road Network

Minimize Direction Violations in a Directed Road Network There are n nodes numbered from 0 through n - 1. Every input edge [u, v] has an original dire...

Coding & Algorithms
48
4
329 people solved
Jul 5, 2026
Databricks logo
Databricks
Hard
Software EngineerSenior+

Implement Generalized Tic-Tac-Toe

Implement Generalized Tic-Tac-Toe Implement a TicTacToe class for two players on an m by n board with a configurable winning length k. `text TicTacToe...

Coding & Algorithms
15
0
148 people solved
Jul 7, 2026
Google logo
Google
Medium
Software Engineer

Intervals with Exactly X Concurrent Meetings

Intervals with Exactly X Concurrent Meetings Given half-open meeting intervals and an integer X, return every maximal half-open time interval during w...

Coding & Algorithms
2
0
26 people solved
Aug 1, 2026
Figma logo
Figma
Medium
Software Engineer

Convert Leveled Rich-Text Tokens into Nested Lists

Convert Leveled Rich-Text Tokens into Nested Lists Problem Implement read_rich_text(tokens). Each token is a pair (level, text) in document order, whe...

Coding & Algorithms
6
0
49 people solved
Jul 21, 2026
Amazon logo
Amazon
Hard
Software Engineer

Minimize Replacements So Equal Product Values Are Contiguous

Minimize Replacements So Equal Product Values Are Contiguous You are given the quality value of each product in a line. In one operation, choose two d...

Coding & Algorithms
13
1
158 people solved
Jul 12, 2026
Amazon logo
Amazon
Medium
Software EngineerSenior+

Schedule Priority Jobs with Cooldowns

Schedule Priority Jobs with Cooldowns Implement a scheduler for recurring jobs: `text addJob(job_id, priority, cooldown) -> bool getJob() -> job_id or...

Coding & Algorithms
10
0
73 people solved
Jul 17, 2026
Amazon logo
Amazon
Hard
Software Engineer

Merge Overlapping Intervals with a Sweep

Merge Overlapping Intervals with a Sweep Implement merge_intervals(intervals) for closed integer intervals [start, end] with start <= end. Return thei...

Coding & Algorithms
0
0
11 people solved
Aug 11, 2026
Upstart logo
Upstart
Medium
Software Engineer

Sum Multiples of Three, Five, or Seven

Sum Multiples of Three, Five, or Seven Implement sum_multiples(limit). Return the sum of all distinct positive integers strictly less than limit that ...

Coding & Algorithms
5
0
40 people solved
Jul 27, 2026
Capital One logo
Capital One
Medium
Software Engineer

Count Pairs of Cyclically Equivalent Integers

Count Pairs of Cyclically Equivalent Integers Two non-negative integers are cyclically equivalent when their standard decimal strings have the same le...

Coding & Algorithms
6
0
90 people solved
Jul 21, 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