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
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
84 people solved
Nov 1, 2025
Dropbox logo
Dropbox
Medium
Software Engineer

Implement feedback for word guessing game

You are implementing the core logic for a simple word-guessing game. There is: - A dictionary of valid words: a list of distinct lowercase strings, al...

Coding & Algorithms
6
0
117 people solved
Nov 1, 2025
Meta logo
Meta
Medium
Software Engineer

Solve LeetCode stack and tree problems

Question LeetCode 1249. Minimum Remove to Make Valid Parentheses LeetCode 863. All Nodes Distance K in Binary Tree https://leetcode.com/problems/minim...

Coding & Algorithms
16
0
50 people solved
Jul 29, 2025
Google logo
Google
Medium
Software Engineer

Remove elements to avoid k-prefix duplicates

Question Given two lists listA and listB and an integer k, delete elements from listB so that the first k elements of the new listB share no value wit...

Coding & Algorithms
26
1
62 people solved
Jul 29, 2025
Datadog logo
Datadog
Medium
Software Engineer

Compute sliding window sums by tag

Question Given a list of datapoints where each datapoint has tags, a timestamp, and a value, write a function that, for a specified tag t and window s...

Coding & Algorithms
4
0
17 people solved
Jul 29, 2025
Meta logo
Meta
Medium
Software Engineer

Design LRU cache and pick k closest points

Design LRU cache and pick k closest points 1) Design a fixed-capacity in-memory cache that evicts the least recently used key when full. Support get(k...

Coding & Algorithms
6
0
60 people solved
Jul 29, 2025
Headway logo
Headway
Hard
Software Engineer Locked

Implement Journey Counter and Speeder Detector

This question evaluates parsing, time-series processing, and algorithmic reasoning for detecting complete journeys and speed violations from structure...

Coding & Algorithms
6
0
91 people solved
Feb 20, 2026
Waymo logo
Waymo
Medium
Software Engineer Locked

Find Shortest Knight Path

This question evaluates a candidate's ability to model grid-based movement as a graph and apply shortest-path traversal techniques, testing algorithmi...

Coding & Algorithms
5
0
37 people solved
Feb 20, 2026
Google logo
Google
Medium
Software Engineer Locked

Solve array-sum and city-community problems

This question evaluates array-processing and grid/graph connectivity skills, covering counting subarrays with a target sum and identifying connected b...

Coding & Algorithms
6
0
62 people solved
Feb 20, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Compute nearest-exit distances in a grid

Compute nearest-exit distances in a grid You are given a 2D grid representing a building floor with three cell types: -1 for walls, 0 for exits, and a...

Coding & Algorithms
6
0
69 people solved
Jul 28, 2025
Pinduoduo logo
Pinduoduo
Easy
Software Engineer

Find next greater element for subset

You are given two integer arrays query and nums. - All elements in nums are distinct. - Every element in query also appears in nums. For each value x ...

Coding & Algorithms
3
0
37 people solved
Feb 19, 2026
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer Locked

Implement K-Means and Explain Convergence

Implement K-means clustering in Python and explain convergence. Covers assignment and update steps, stopping criteria, empty clusters, objective funct...

Coding & Algorithms
6
0
45 people solved
May 3, 2025
PayPal logo
PayPal
Hard
Data Scientist

Compute Variance from a Python List

Given a Python list of numeric values, write a function to compute the variance without using external libraries such as NumPy or pandas. Clarify any ...

Coding & Algorithms
9
0
83 people solved
Oct 29, 2025
Pitchbook logo
Pitchbook
Easy
Software Engineer

Implement Euclidean distance and k-nearest neighbors

You are working with points in an n-dimensional Euclidean space, where each point is represented as a list (or array) of numeric coordinates. Assume: ...

Coding & Algorithms
4
0
51 people solved
Oct 29, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Compute minimum-cost service cover

You are given: ( 1) a list of rental service packages, where each package contains a set of services (strings) and a non-negative price, e.g., [(["wif...

Coding & Algorithms
22
0
181 people solved
Jul 26, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Simulate pouring water onto a 1D terrain

You are given a 1D terrain represented by an integer array heights, where heights[i] is the height of the column at index i. Part 1 — Render terrain W...

Coding & Algorithms
37
0
268 people solved
Oct 28, 2025
Bytedance logo
Bytedance
Medium
Software EngineerSenior+

Build a validated add-sub calculator

Given a string expression, write a function that validates and evaluates it. The expression represents arithmetic using only non-negative integers and...

Coding & Algorithms
5
0
44 people solved
Feb 18, 2026
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer

Generate uniform 0–6 from biased coin

You are given a function: - int getRandom01Biased() returns 0 with probability p and 1 with probability 1-p, where p is unknown and may be any value i...

Coding & Algorithms
14
0
109 people solved
Feb 18, 2026
Shopify logo
Shopify
Medium
Machine Learning Engineer

Simulate robot moves on a grid

You are given an m x n grid and a robot that starts at position (r, c) (0-indexed). You are also given a string commands consisting of characters 'U',...

Coding & Algorithms
10
0
120 people solved
Feb 18, 2026
Amazon logo
Amazon
Hard
Software EngineerSenior+

Evaluate IP Access Rules

You are given a list of IPv4 access-control rules. Each rule consists of: - an action: allow or deny - a CIDR block such as 192.168.0.0/16 You are als...

Coding & Algorithms
15
0
203 people solved
Feb 17, 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