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

Determine Maximum Path Length in Directed Acyclic Graph

Scenario A backend service represents task dependencies as a directed graph; you need to understand how deep the longest dependency chain can get. Que...

Coding & Algorithms
22
0
76 people solved
Aug 4, 2025
Pinterest logo
Pinterest
Medium
Data Scientist

Calculate 95% Bootstrap Confidence Interval for Order Values

Scenario An e-commerce firm wants a 95% confidence interval for the average order value but only has a single historical sample of order amounts. Ques...

Coding & Algorithms
27
0
45 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Implement BFS to Find Shortest Path in Graph

Scenario Social network needs to compute the shortest friend-distance between two users in an undirected graph containing millions of nodes. Question ...

Coding & Algorithms
13
0
27 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Implement and Analyze 'Merge k Sorted Lists' Algorithm

Scenario Algorithm coding challenge during the final interview round. Question Implement LeetCode 23 ‘Merge k Sorted Lists’ and explain your complexit...

Coding & Algorithms
18
0
47 people solved
Aug 4, 2025
Amazon logo
Amazon
Medium
Data Scientist

Design a Scalable, Fault-Tolerant Distributed Order System

Scenario Round covering distributed-system design and algorithm implementation. Question Design a highly available, low-latency distributed order-proc...

Coding & Algorithms
23
0
65 people solved
Aug 4, 2025
Jane Street logo
Jane Street
Medium
Data Scientist

Optimal Stopping for Die Rolls That Bust on Perfect Squares

You repeatedly roll a fair six-sided die and keep a running cumulative sum $S$ of all the values rolled so far (starting from $S = 0$ before the first...

Coding & Algorithms
0
0
5 people solved
Aug 3, 2025
Pinterest logo
Pinterest
Medium
Data Scientist

Find available reservation time slots

Problem You are building an API to show which time slots are available for booking at a restaurant. You are given: - The restaurant’s opening hours (p...

Coding & Algorithms
12
0
101 people solved
Aug 2, 2025
Citadel logo
Citadel
Medium
Software Engineer

Optimize password transform and discount scheduling

Optimize password transform and discount scheduling Part 1 — Transform to palindromic k-periodic string: Input: a lowercase string currentPassword and...

Coding & Algorithms
15
0
134 people solved
Aug 1, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Solve budget queries and shortest path

1) Budgeted purchases with sorted array: You are given an array prices of n positive integers and q budget queries. For each budget B, you may buy ite...

Coding & Algorithms
2
0
49 people solved
Aug 1, 2025
Samsara logo
Samsara
Medium
Software Engineer

Parse Markdown Links Without Regex

Implement a function that converts simplified link syntax text into an HTML anchor tag <a href="url">text</a> across an entire input string. Constrain...

Coding & Algorithms
13
0
103 people solved
Aug 1, 2025
J.P. Morgan logo
J.P. Morgan
Medium
Software Engineer

Compute longest palindromic subsequence

Given a string s (1 ≤ |s| ≤ 2000), implement a function that returns the length of the longest subsequence of s that reads the same forward and backwa...

Coding & Algorithms
1
0
25 people solved
Aug 1, 2025
Meta logo
Meta
Medium
Data Engineer

Check carpool trip feasibility

You are given a list of trips where each trip i is (passengers_i, start_i, end_i) with start_i < end_i on a one-dimensional route. A single vehicle wi...

Coding & Algorithms
6
0
77 people solved
Aug 1, 2025
Instacart logo
Instacart
Medium
Software Engineer

Parse a password from a matrix

Given an m x n matrix of characters, a starting coordinate (row, col), and a string of moves consisting of 'U', 'D', 'L', 'R', parse a password by vis...

Coding & Algorithms
7
0
78 people solved
Aug 1, 2025
Jump Trading logo
Jump Trading
Medium
Machine Learning Engineer

Solve stock-pattern trading and substring elimination

Part A — Stock trading by pattern signals: - Input: an integer array prices (length n) of daily stock prices; an array buyPattern and an array sellPat...

Coding & Algorithms
5
0
100 people solved
Aug 1, 2025
Instacart logo
Instacart
Medium
Software Engineer

Validate password strength and repair

Given a password policy—length between 8 and 20 characters; must include at least one lowercase letter, one uppercase letter, and one digit; and must ...

Coding & Algorithms
9
0
95 people solved
Aug 1, 2025
Circle logo
Circle
Medium
Software Engineer

Design payment scheduler with cancel and top-K outgoing

Design and implement an in-memory banking payment component with the following APIs: ( 1) schedulePayment(payerId, payeeId, amount, executeAt) -> paym...

Coding & Algorithms
14
0
120 people solved
Aug 1, 2025
Salesforce logo
Salesforce
Medium
Software Engineer

Design O(nm) grouping of rearranged strings

Given an array of strings, group together words that are permutations of the same characters. Provide a baseline solution that sorts each word (O(n · ...

Coding & Algorithms
10
0
87 people solved
Aug 1, 2025
Uber logo
Uber
Medium
Software Engineer

Design time-versioned KV without timestamp argument

Design a time-versioned key-value store that does not accept a timestamp argument on writes. Support set(key, value) which stores the value with an in...

Coding & Algorithms
3
0
74 people solved
Aug 1, 2025
Uber logo
Uber
Medium
Software Engineer

Implement binary search from scratch

Question Implement binary search on a sorted integer array without using any library helpers (no bisect, Arrays.binarySearch, etc.). Provide both iter...

Coding & Algorithms
11
0
83 people solved
Aug 1, 2025
Google logo
Google
Medium
Software Engineer

Implement zigzag level-order traversal

Given the root of a binary tree, return the node values in zigzag level order: visit nodes level by level, reading the first level from left to right,...

Coding & Algorithms
7
1
61 people solved
Aug 1, 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