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

Explain C++ vector, unordered_map, and virtual functions

Explain C++ vector, unordered_map, and virtual functions In C++, explain: - The amortized and worst-case time complexity of vector::push_back, and how...

Coding & Algorithms
25
0
183 people solved
Jul 16, 2025
Point72 logo
Point72
Medium
Data Scientist

Find the Minimum in a Rotated Sorted Array

Find the Minimum in a Rotated Sorted Array A strictly increasing array of distinct integers has been rotated at an unknown pivot. Return its minimum v...

Coding & Algorithms
0
0
4 people solved
Dec 14, 2025
Point72 logo
Point72
Medium
Data Scientist

Maximum Profit with Unlimited Stock Transactions

Maximum Profit with Unlimited Stock Transactions Given daily stock prices, compute the maximum profit from any number of buy-and-sell transactions. Yo...

Coding & Algorithms
0
0
4 people solved
Dec 14, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Implement a simple service with tests

Implement a simple service with tests You're given a short written specification for a small service class (no external dependencies). Implement the c...

Coding & Algorithms
9
0
105 people solved
Jul 15, 2025
Quora logo
Quora
Medium
Software Engineer

Count distinct palindromic subsequences

Given a string s consisting of lowercase English letters, compute how many distinct palindromic subsequence strings of lengths 2, 3, and 4 can be form...

Coding & Algorithms
6
0
48 people solved
Mar 19, 2026
Disney logo
Disney
Medium
Machine Learning Engineer

Determine if chasing points will meet

You are given N points in 2D, indexed 0..N-1, forming a cycle. - At time t = 0, point i is at coordinates (xi, yi). - All points move simultaneously a...

Coding & Algorithms
8
0
83 people solved
Nov 1, 2025
Mithril logo
Mithril
Medium
Software Engineer Locked

Determine Safe Bomb Defusal

This question evaluates competency in graph traversal, state-space search, reachability analysis, and handling safety constraints within finite state ...

Coding & Algorithms
0
0
9 people solved
May 18, 2026
Upstart logo
Upstart
Medium
Software Engineer Locked

Implement Byte Formatting and Cafeteria Billing

This question evaluates precision in numeric formatting and unit conversion for byte sizes, along with stateful simulation of capacity-constrained eve...

Coding & Algorithms
1
0
21 people solved
May 18, 2026
Hackerrank logo
Hackerrank
Medium
Software Engineer Locked

Find Final Ball Holder

This question evaluates understanding of functional graphs, cycle detection, and handling large-step transitions in deterministic mappings where repea...

Coding & Algorithms
3
0
40 people solved
Mar 18, 2026
Coinbase logo
Coinbase
Medium
Data Scientist Locked

Implement Plus One

This question evaluates proficiency in array manipulation, elementary arithmetic operations such as carry propagation, and careful handling of edge ca...

Coding & Algorithms
3
0
64 people solved
Mar 17, 2026
Databricks logo
Databricks
Medium
Software Engineer Locked

Find the Best Commute Mode

This question evaluates competency in grid-based pathfinding, graph traversal, and multi-criteria optimization of path time and cost within the Coding...

Coding & Algorithms
3
0
22 people solved
May 17, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Debug a driver assignment bug

Given a service that selects the best delivery driver ("dasher") for an order, users report incorrect assignments. With a provided codebase and failin...

Coding & Algorithms
41
0
318 people solved
Aug 13, 2025
Optiver logo
Optiver
Medium
Software Engineer

Implement price-based order matcher

Design and implement a price-based order matcher for unit-sized orders. You are given an array orders where each element is [type, price]: type = 1 de...

Coding & Algorithms
39
0
392 people solved
Aug 13, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement PyTorch training loop

Implement a basic PyTorch training loop You are given a PyTorch neural network model, a DataLoader that yields (inputs, targets) batches, an optimizer...

Coding & Algorithms
9
0
93 people solved
Dec 8, 2025
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Return Top K Relevant Apps

This question evaluates algorithmic problem-solving around aggregation and ranking, testing skills in computing aggregated relevance scores, determini...

Coding & Algorithms
12
0
108 people solved
Mar 16, 2026
Morgan Stanley logo
Morgan Stanley
Medium
Data Scientist

How do you escape the circle?

A dog runs continuously along the boundary of a circle of radius 1 at speed 4. You start at an arbitrary point strictly inside the circle and can run ...

Coding & Algorithms
3
0
49 people solved
Dec 8, 2025
Verkada logo
Verkada
Medium
Software Engineer

Implement LRU and LFU caches

Implement two in-memory cache classes with fixed capacity: 1. Recent-use cache - get(key): return the value for key, or -1 if the key does not exis...

Coding & Algorithms
3
0
68 people solved
Jan 23, 2026
LinkedIn logo
LinkedIn
Medium
Software Engineer

Find k closest values in a BST

Find k closest values in a BST Given a binary search tree with n nodes and a real target t, return k node values whose distances to t are smallest. Im...

Coding & Algorithms
5
0
101 people solved
Aug 10, 2025
Scale AI logo
Scale AI
Hard
Software Engineer Locked

Implement Dependency-Aware Task Scheduler

This question evaluates skills in designing and implementing data structures and algorithms for priority scheduling, dependency resolution, and dynami...

Coding & Algorithms
3
0
22 people solved
May 16, 2026
NVIDIA logo
NVIDIA
Medium
Software Engineer

Implement core graph algorithms for graphics

Implement core graph algorithms for graphics Given a scene or dependency graph, implement topological sort, BFS/DFS, and shortest path (Dijkstra). Dis...

Coding & Algorithms
8
0
82 people solved
Aug 9, 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