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

Design robot path boundedness with repeats

You are given a 2D grid with a set of blocked cells (obstacles) and a robot starting at (0, 0) facing north. The robot executes a finite instruction s...

Coding & Algorithms
21
0
169 people solved
Aug 1, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Implement Connect Four with win detection

Implement a Connect Four game engine. Support a general m×n board (default 6× 7) and a win condition of k in a row (default 4). Provide an API: Connec...

Coding & Algorithms
17
0
107 people solved
Jul 31, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Compute shortest path to collect all keys

You are given an m×n grid containing walls (#), open cells (.), a single start cell (@), up to six keys labeled 'a'–'f', and matching doors 'A'–'F' th...

Coding & Algorithms
9
0
105 people solved
Jul 31, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Find palindrome-forming string pairs

Given an array of distinct lowercase strings words, return all index pairs (i, j) with i != j such that the concatenation words[i] + words[j] is a pal...

Coding & Algorithms
12
0
87 people solved
Jul 31, 2025
HubSpot logo
HubSpot
Medium
Software Engineer

Merge two sorted linked lists

Given the heads of two singly linked lists sorted in non-decreasing order, merge them into a single sorted singly linked list and return its head. Imp...

Coding & Algorithms
6
0
57 people solved
Jul 31, 2025
Atlassian logo
Atlassian
Medium
Software Engineer

Find nearest common manager for multiple employees

Given an organizational hierarchy modeled as a rooted tree, build the tree from (employee, manager) pairs and implement a function that, for k ≥ 2 emp...

Coding & Algorithms
9
0
116 people solved
Jul 31, 2025
Nextdoor logo
Nextdoor
Medium
Software Engineer

Implement version string comparator with extensions

Implement a function compareVersions(a, b) that compares two software version strings. Each version consists of dot-separated numeric components (e.g....

Coding & Algorithms
11
0
92 people solved
Jul 31, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find substring from dictionary concatenation

Given a string s and a dictionary of words dict, determine whether s contains a substring that is exactly a concatenation of one or more words from di...

Coding & Algorithms
2
0
35 people solved
Jul 31, 2025
Amazon logo
Amazon
Medium
Software Engineer

Compute fruit spoilage time in a grid

Given an m×n grid representing kitchen cells: 0 for empty, 1 for fresh fruit, and 2 for spoiled fruit. Each minute, any fresh fruit adjacent (up, down...

Coding & Algorithms
1
0
34 people solved
Jul 31, 2025
Adobe logo
Adobe
Medium
Software Engineer

Implement file word count

Write a function that reads a large text file and returns the frequency count of each word. Define how you will normalize tokens (case, Unicode, punct...

Coding & Algorithms
6
0
69 people solved
Jul 31, 2025
Adobe logo
Adobe
Medium
Software Engineer

Determine feasible task ordering

You are given n tasks labeled 0..n−1 and a list of dependency pairs (a, b) meaning task a requires task b to be completed first. Implement functions t...

Coding & Algorithms
6
0
47 people solved
Jul 31, 2025
Bloomberg logo
Bloomberg
Medium
Software Engineer

Implement island counting with BFS and DFS

Question You are given an m x n grid of characters where '1' represents land and '0' represents water. Count the number of distinct islands (connected...

Coding & Algorithms
6
0
68 people solved
Jul 31, 2025
DoorDash logo
DoorDash
Medium
Software EngineerSenior+

Solve BFS grid delivery routing

You are given an m×n grid representing a city: 'S' are DashMart stores, 'H' are homes, '.' are roads, and '#' are obstacles. Movement is allowed in fo...

Coding & Algorithms
8
0
70 people solved
Jul 31, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Implement string matching with follow-up

Question Given a text T and a pattern P, implement a function firstIndex(T, P) that returns the starting index of the first occurrence of P in T, or -...

Coding & Algorithms
7
0
52 people solved
Jul 31, 2025
Instacart logo
Instacart
Medium
Software Engineer

Compute and optimize average wait time

You are given n pickup orders for a grocery delivery counter. Each order i is described by orders[i] = [arrival_i, service_i] in minutes, where arriva...

Coding & Algorithms
16
0
114 people solved
Jul 31, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Check diagonal equality in a matrix

Given an m x n integer matrix, determine whether every top-left to bottom-right diagonal contains identical values (all elements along each such diago...

Coding & Algorithms
6
0
62 people solved
Jul 31, 2025
Databricks logo
Databricks
Medium
Software Engineer

Design an IP filter using CIDR rules

Explain CIDR notation with a couple of concrete examples. Show how to convert a prefix like 192.168.0.0/16 into an inclusive 32-bit integer range and ...

Coding & Algorithms
33
0
256 people solved
Jul 31, 2025
Amazon logo
Amazon
Medium
Software Engineer

Implement basic calculator

Question LeetCode 227. Basic Calculator II – implement an arithmetic expression evaluator supporting +, -, *, / and integer operands https://leetcode....

Coding & Algorithms
10
0
32 people solved
Jul 29, 2025
SoFi logo
SoFi
Medium
Software Engineer

Implement tree ops and LRU cache

Question Implement set(index) and clear(index) for the leaves of a full binary tree initially filled with 0s, where a parent node becomes 1 only when ...

Coding & Algorithms
19
0
48 people solved
Jul 29, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Review Python geodata code

Question You are given a Python codebase that performs geolocation data processing. Conduct a thorough code review: identify readability, correctness,...

Coding & Algorithms
8
0
29 people solved
Jul 29, 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