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
Google logo
Google
Easy
Software Engineer

Compute max coins with 3-step token moves

You are given a one-dimensional board with n positions represented by a string s of length n: - . = empty cell - T = token - C = coin You may move tok...

Coding & Algorithms
22
0
151 people solved
Oct 16, 2025
Atlassian logo
Atlassian
Medium
Machine Learning Engineer Locked

Assign bookings to minimum tennis courts

This question evaluates interval scheduling and resource-allocation competencies, testing algorithmic and data-structure knowledge for handling time-i...

Coding & Algorithms
3
0
34 people solved
Oct 15, 2025
Databricks logo
Databricks
Hard
Data ScientistIntern

Find top-5 most similar rows across datasets

You are given two datasets with the same feature columns: - source (rows you want to match): - source_id (STRING/INT) - f1...fk (NUMERIC; may cont...

Coding & Algorithms
2
0
45 people solved
Oct 14, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Design cache with least-recently-used eviction

You are asked to design an in-memory key–value cache that supports a least-recently-used (LRU) eviction policy. The cache must support the following o...

Coding & Algorithms
3
0
38 people solved
Oct 14, 2025
Roblox logo
Roblox
Hard
Software Engineer

Rank queries by prefix, frequency, and time

You are given three arrays of the same length n: - queries[i]: a non-empty string representing the text of the i-th query. - timestamps[i]: an integer...

Coding & Algorithms
32
0
290 people solved
Oct 14, 2025
Capital One logo
Capital One
Medium
Data Scientist

Implement minimal-cost overtime/contractor allocation

You must cover H extra engineering hours this week at minimum cost using employee overtime and optional contractors. Each employee i has a maximum ove...

Coding & Algorithms
7
0
51 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Implement percentage RMSE and bootstrap its CI

Given a CSV with columns [country, actual_revenue, predicted_revenue], define percentage RMSE as pRMSE = sqrt(mean_i((pred_i/actual_i − 1)^2)). a) Imp...

Coding & Algorithms
6
0
49 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Solve two-sum variants at scale

Base task: Given nums = [3, 1, 2, 2, 4] and target = 4, return the 0-based index pair (i, j) with i < j such that nums[i] + nums[j] = target. If multi...

Coding & Algorithms
9
0
69 people solved
Oct 13, 2025
OneMain Financial logo
OneMain Financial
Medium
Data Scientist

Implement an LRU cache with O(1) ops

Design and code an LRU cache supporting get(key) and put(key, value) in O(1) average time with capacity N. Specify your data structures, handle update...

Coding & Algorithms
5
0
42 people solved
Oct 13, 2025
Point72 logo
Point72
Medium
Data Scientist

Classify relationships for multiple circle pairs

Given an array pairs of N circle pairs, where each circle is (x, y, r) with integer coordinates and r ≥ 0, classify each pair into one of: IDENTICAL (...

Coding & Algorithms
6
0
61 people solved
Oct 13, 2025
Point72 logo
Point72
Medium
Data Scientist

Maximize outfits with distinct colors

You're given counts of items by color; each outfit must contain exactly 3 items, all of distinct colors. You cannot reuse items. Input formats: either...

Coding & Algorithms
4
0
57 people solved
Oct 13, 2025
Netflix logo
Netflix
Medium
Data Scientist

Implement longest increasing subarray with one deletion

Given an array of integers nums, return the length of the longest strictly increasing contiguous subarray you can obtain by deleting at most one eleme...

Coding & Algorithms
18
0
129 people solved
Oct 13, 2025
Citadel logo
Citadel
Medium
Data Scientist

Implement max profit with K transactions (DP)

Given an array prices[0..n-1] of daily stock prices and an integer k, implement a bottom-up dynamic program to compute the maximum achievable profit w...

Coding & Algorithms
3
0
31 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Generate primes up to n efficiently

Implement a function that returns all prime numbers in the inclusive range 1..n. Requirements: handle n up to 10^7 efficiently (time and memory); retu...

Coding & Algorithms
5
0
36 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data Scientist

Compute array modes with ties and no-mode rule

Write a function that returns the mode(s) of an integer array. Requirements: if all values are unique, return an empty list (there is no mode); allow ...

Coding & Algorithms
3
0
31 people solved
Oct 13, 2025
Medium
Data Scientist

Implement multiplication without using the multiplication operator

Implement int multiply(int a, int b) without using * or /. You may use +, −, bitwise operators, and shifts. Requirements: - Handle negatives, zero, an...

Coding & Algorithms
2
0
37 people solved
Oct 13, 2025
Google logo
Google
Medium
Data Scientist

Implement longest subarray summing to k

Given an integer array nums (length ≤ 200,000; values may be negative) and integer k, return the maximum length and the [l, r] indices of a contiguous...

Coding & Algorithms
8
0
68 people solved
Oct 13, 2025
Coinbase logo
Coinbase
Medium
Data Scientist

Detect sequence rule and repair anomaly

Implement next_value(seq: list[int]) that detects the rule of a numeric sequence and returns a tuple (model_name, parameters, anomaly_index_or_None, n...

Coding & Algorithms
3
0
62 people solved
Oct 13, 2025
Atlassian logo
Atlassian
Medium
Data Scientist

Implement sliding-window rate limiter with dual thresholds

Implement getRequestStatus(urls: List[str]) -> List[str]. The i-th entry in urls represents a single incoming request at timestamp t = i seconds (t st...

Coding & Algorithms
7
0
56 people solved
Oct 13, 2025
Amazon logo
Amazon
Medium
Data ScientistSenior+

Implement streaming k-way merge with constraints

Implement a function merge_k(iterators, N) that returns the first N items of the global ascending order from k sorted, potentially unbounded iterators...

Coding & Algorithms
6
0
86 people solved
Oct 13, 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