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

Compute max profit across dated stock quotes

You are given an unsorted list of price records for multiple stocks, each record as (date, symbol, price). Dates may be repeated across different symb...

Coding & Algorithms
17
0
133 people solved
Sep 6, 2025
Visa logo
Visa
Medium
Software Engineer

Maintain pair-sum counts under replacements

You are given two integer arrays A and B and a list of operations: ( 1) Query(T): return the number of pairs (i, j) such that A[i] + B[j] = T. ( 2) Re...

Coding & Algorithms
4
0
75 people solved
Sep 6, 2025
Bloomberg logo
Bloomberg
Medium
Software Engineer

Find maximum cable length by cutting

You are given N cables with integer lengths and a target K. Cut the cables into pieces of equal integer length L to produce at least K pieces; maximiz...

Coding & Algorithms
6
0
63 people solved
Sep 6, 2025
Snapchat logo
Snapchat
Medium
Software Engineer

Design Manhattan-distance meeting point finder

Given an m×n grid with cells marked 1 for homes and 0 otherwise, choose a single meeting cell that minimizes the sum of Manhattan distances from all h...

Coding & Algorithms
5
0
50 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Solve four data structure and algorithms tasks

1) Print the numbers at each level of a binary tree. Given the root, output the values level-by-level (each level on a new line or as a list of lists)...

Coding & Algorithms
4
0
38 people solved
Sep 6, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Optimize C++ Performance with Provided Concurrency

Given a C++ codebase where threading components (threads, work queues, and synchronization primitives) are already provided, profile and optimize the ...

Coding & Algorithms
10
0
167 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute Differences Between Catalog Trees

You are given two rooted catalog trees. Each node has a unique string key among its siblings and an associated value. Compare the two trees and return...

Coding & Algorithms
13
0
107 people solved
Sep 6, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Implement KV store and plan type conversions

Part 1 — Versioned key-value store: Implement a data structure with set(key, value, t) and get_at(key, t) that returns the value for key whose timesta...

Coding & Algorithms
48
0
371 people solved
Sep 6, 2025
Rippling logo
Rippling
Medium
Software Engineer

Compute peak concurrent drivers in 24 hours

Given delivery intervals across multiple drivers, compute the maximum number of distinct drivers simultaneously active within the last 24 hours from a...

Coding & Algorithms
19
0
202 people solved
Sep 6, 2025
Google logo
Google
Medium
Software Engineer

Compute shortest paths with blocked nodes

Given a graph with nodes and edges and a designated source node s, compute the shortest distance from s to every other node. Some nodes are inaccessib...

Coding & Algorithms
13
0
89 people solved
Sep 6, 2025
Akuna Capital logo
Akuna Capital
Medium
Software Engineer

Heapify an array into a max-heap

Given the array [6, 15, 2, 4, 3, 8, 19], apply heapify to build a max-heap using the standard in-place bottom-up method with a 0-indexed array represe...

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

Break a palindrome to smallest non-palindrome

Given a palindromic string s of lowercase English letters, change exactly one character to obtain a new string that is not a palindrome and is lexicog...

Coding & Algorithms
1
0
30 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Compute max profit from single stock trade

Given an array prices where prices[i] is the stock price on day i, compute the maximum profit achievable with at most one transaction (one buy and one...

Coding & Algorithms
1
0
23 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Implement hostname-restricted web crawler

Implement a single-threaded web crawler that, given a starting URL startUrl and an interface getUrls(url) that returns all hyperlinks on the page at u...

Coding & Algorithms
10
0
167 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Find the nearest city sharing axis

You are given N cities, each with a unique name and integer coordinates (x, y). For any query city, return the nearest city that shares either the sam...

Coding & Algorithms
13
0
87 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Design a single-machine LRU cache

Design an in-memory LRU cache for a single machine using a hash map and a doubly linked list to support O( 1) get and put. Explain how you handle capa...

Coding & Algorithms
9
0
76 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Merge overlapping and adjacent ranges

Given an unsorted list of integer ranges represented as half-open intervals [start, end) with start < end, merge all overlapping or directly adjacent ...

Coding & Algorithms
3
0
33 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Design a fixed-capacity circular queue

Design a fixed-capacity circular queue that supports enqueue(x), dequeue(), front(), rear(), isEmpty(), and isFull() operations in O( 1) time. Impleme...

Coding & Algorithms
1
0
28 people solved
Sep 6, 2025
Snowflake logo
Snowflake
Medium
Software Engineer

Transform tree using counterpart subtree sums

Given the roots of two complete binary trees with identical structure, modify the node values of the second tree so that each node equals the sum of a...

Coding & Algorithms
8
0
71 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Implement string dedup and mirror tree traversal

- String cleanup with group deletions (LeetCode-inspired): Given a string s consisting of lowercase letters, repeatedly delete any maximal contiguous ...

Coding & Algorithms
1
0
27 people solved
Sep 6, 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