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

Dot Product of Two Vectors (Dense, then Sparse)

This question assesses proficiency in array manipulation and algorithmic efficiency by asking for a vector dot product, first over dense arrays and th...

Coding & Algorithms
1
0
9 people solved
Jun 11, 2026
Amazon logo
Amazon
Medium
Software EngineerNew Grad Locked

Inventory Allocation by Bid Priority

This question assesses simulation and priority-queue design skills, requiring careful implementation of tiered, round-robin resource allocation under ...

Coding & Algorithms
1
0
13 people solved
Jun 9, 2026
Databricks logo
Databricks
Medium
Software EngineerSenior+ Locked

Optimal Commute: Nearest Transit Distance in a City Grid

This question evaluates a candidate's ability to apply multi-source breadth-first search to a grid-based shortest-path problem. It tests graph travers...

Coding & Algorithms
1
0
21 people solved
Jun 9, 2026
Google logo
Google
Medium
Software Engineer Locked

Most Active Users in a Live Communication Stream

This question tests practical application of hash-based data structures and stream processing to track and rank user activity with deduplication logic...

Coding & Algorithms
4
0
9 people solved
Jun 9, 2026
Anchorage logo
Anchorage
Medium
Software Engineer Locked

Print the File System State

This question evaluates a candidate's ability to serialize and format in-memory data structures for deterministic textual output, focusing on represen...

Coding & Algorithms
0
0
6 people solved
Jun 9, 2026
Hive.Ai logo
Hive.Ai
Hard
Software Engineer Locked

Validate Adding an Edge to a Directed Acyclic Graph

Determine whether a proposed directed edge is new and can be added to an existing DAG without creating a cycle. Reject self-loops and duplicates, then...

Coding & Algorithms
0
0
11 people solved
Jun 8, 2026
Hive.Ai logo
Hive.Ai
Hard
Software Engineer Locked

Calculate Trapped Rain Water

Calculate how much rain water is trapped between nonnegative unit-width bars without mutating the input. A two-pointer scan tracks the highest boundar...

Coding & Algorithms
0
0
7 people solved
Jun 8, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Reconstruct the Alphabet Order of an Alien Language

This question tests graph construction and topological sorting, core algorithmic skills for reasoning about partial orderings derived from constraints...

Coding & Algorithms
0
0
1 people solved
Jun 8, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Implement A Contiguous Memory Allocator With Free-Block Coalescing

Review a contiguous memory allocator coding prompt with malloc, free, first-fit allocation, block coalescing, and a best-fit follow-up. The interview ...

Coding & Algorithms
22
1
165 people solved
Jun 5, 2026
J.P. Morgan logo
J.P. Morgan
Medium
Software Engineer Locked

Merge Overlapping Intervals

This question tests practical array manipulation and sorting skills by requiring candidates to consolidate overlapping numeric intervals into a minima...

Coding & Algorithms
0
0
6 people solved
Jun 5, 2026
J.P. Morgan logo
J.P. Morgan
Medium
Software Engineer Locked

Can All Courses Be Completed?

This question tests graph traversal and cycle detection skills, specifically the ability to model dependency relationships as a directed graph. It eva...

Coding & Algorithms
0
0
2 people solved
Jun 5, 2026
J.P. Morgan logo
J.P. Morgan
Medium
Software Engineer Locked

Shift Non-Zero Elements Left In Place

This question tests a candidate's ability to perform in-place array manipulation while preserving element order, evaluating practical understanding of...

Coding & Algorithms
0
0
6 people solved
Jun 5, 2026
Mavenclinic logo
Mavenclinic
Medium
Software Engineer Locked

Check Meeting Attendance With Breaks

This question evaluates proficiency with interval scheduling, time-format conversion, and constraint checking for sequential appointments, measuring a...

Coding & Algorithms
0
0
5 people solved
Jun 5, 2026
Amazon logo
Amazon
Hard
Software Engineer Locked

Find the Maximum Number of Concurrent Processes

Practice a Amazon coding interview problem focused on find the maximum number of concurrent processes. The prompt emphasizes edge cases, clean impleme...

Coding & Algorithms
0
0
7 people solved
Jun 4, 2026
Amazon logo
Amazon
Hard
Software Engineer Locked

Evaluate an Arithmetic Expression in Postfix Notation

Practice a Amazon coding interview problem focused on evaluate an arithmetic expression in postfix notation. The prompt emphasizes edge cases, clean i...

Coding & Algorithms
0
0
4 people solved
Jun 4, 2026
Amazon logo
Amazon
Hard
Software Engineer Locked

Find the Closest Version by Date

Practice a Amazon coding interview problem focused on find the closest version by date. The prompt emphasizes edge cases, clean implementation, and ve...

Coding & Algorithms
0
0
5 people solved
Jun 4, 2026
Databricks logo
Databricks
Medium
Software Engineer Locked

Choose the Best Travel Mode

Solve a grid-based pathfinding problem where a traveler must choose the transportation mode with the lowest travel time and cost tie-breakers. The que...

Coding & Algorithms
1
0
4 people solved
Jun 4, 2026
Pinterest logo
Pinterest
Medium
Machine Learning Engineer Locked

Hierarchical Access Control for an Advertising Platform

This question tests practical application of graph traversal and access control system design using a directed acyclic group hierarchy. It evaluates a...

Coding & Algorithms
1
0
27 people solved
Jun 3, 2026
Google logo
Google
Medium
Software Engineer Locked

Rearrange Tasks With Cooldown

This question evaluates task-scheduling and constraint-handling skills, testing algorithmic reasoning about arranging repeated jobs with cooldown cons...

Coding & Algorithms
3
0
24 people solved
Jun 3, 2026
Tradedesk logo
Tradedesk
Medium
Software EngineerSenior+ Locked

Calculate Bowling Game Score

This question evaluates a candidate's ability to implement rule-based scoring logic, array processing, and stateful iteration to correctly aggregate f...

Coding & Algorithms
0
0
14 people solved
Jun 2, 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