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

Implement 2D transforms and find max-lit point

Part A — 2D array transforms: Given an m×n integer matrix, implement the following in-place operations with clear function boundaries and complexity: ...

Coding & Algorithms
5
0
85 people solved
Sep 6, 2025
DoorDash logo
DoorDash
Medium
Software EngineerSenior+

Implement round-robin load balancer

Implement a load balancer that distributes incoming requests across N backend servers in strict round-robin order. Requirements: ( 1) Support addServe...

Coding & Algorithms
21
0
296 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Software Engineer

Compute build order from dependencies

Given a set of package build dependencies, output a valid build order so that each package is built only after all of its dependencies. The input is a...

Coding & Algorithms
10
0
74 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Count islands on a torus grid

You are given an m x n binary grid representing water ( 0) and land ( 1) laid out on a torus: the top edge is adjacent to the bottom edge and the left...

Coding & Algorithms
3
0
22 people solved
Sep 6, 2025
MathWorks logo
MathWorks
Medium
Software Engineer

Decide transform via one-to-one mapping

You are given two strings s and t of equal length over the lowercase English alphabet. In one step, you may pick any character x and replace all its o...

Coding & Algorithms
10
0
68 people solved
Sep 6, 2025
MathWorks logo
MathWorks
Medium
Software Engineer

Find shortest path using BFS

Given an m×n grid grid where grid[r][c] = 0 represents an empty cell and 1 represents a wall, a start cell (sr, sc), and a target cell (tr, tc), you m...

Coding & Algorithms
2
0
29 people solved
Sep 6, 2025
Rippling logo
Rippling
Medium
Software Engineer

Compute unique-dasher concurrency with tie-breaking

You are given N delivery assignments, each as (dasherId, startTime, endTime) with 0 <= startTime < endTime. A single dasher may hold multiple overlapp...

Coding & Algorithms
24
0
228 people solved
Sep 6, 2025
Google logo
Google
Medium
Software Engineer

Find horizontal cut balancing square areas

Given a 2D table with top-left origin (0, 0), you are provided a finite set of n non-overlapping, axis-aligned square cakes. Each square i has real-va...

Coding & Algorithms
3
0
43 people solved
Sep 6, 2025
Hudson River Trading logo
Hudson River Trading
Medium
Software Engineer

Approach verbose data-structure design

For a data-structure design problem whose behavior is easy to understand but whose implementation is lengthy, describe your step-by-step approach: cla...

Coding & Algorithms
15
0
208 people solved
Sep 6, 2025
SoFi logo
SoFi
Medium
Software Engineer

Simulate 1-D collisions and scale to huge inputs

Given an array of integers representing objects on a 1-D track, where the sign indicates direction (positive moves right, negative moves left) and the...

Coding & Algorithms
4
0
67 people solved
Sep 6, 2025
Scale AI logo
Scale AI
Medium
Software Engineer

Compute community ranges and town idle hours

You are given two in-memory datasets for a party-planning app. 1) PartyWindow: {partyId: string, startTime: ISO-8601 UTC datetime, endTime: ISO-8601 U...

Coding & Algorithms
12
0
135 people solved
Sep 6, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Determine sanitized palindrome in string

Write a function that determines whether a string is a palindrome after removing non-alphanumeric characters and ignoring case (e.g., punctuation, whi...

Coding & Algorithms
6
0
61 people solved
Sep 6, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Detect intersection of two linked lists

Given two singly linked lists that may converge to share a common tail, determine whether they intersect and return the first node at which they join....

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

Find top co-purchased products

You receive purchase logs where each order is represented as an integer array of product IDs bought together in a single transaction. Implement a func...

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

Compute islands in a binary grid

You are given an m-by-n grid of characters where '1' represents land and '0' represents water. Count the number of connected land masses (islands) usi...

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

Implement binary search for boundary index

Given a sorted integer array nums (length n) and an integer target t, return the index of the first element in nums that is greater than or equal to t...

Coding & Algorithms
7
0
57 people solved
Sep 6, 2025
HubSpot logo
HubSpot
Medium
Software Engineer

Design and implement a bank account system

Design and implement a minimal banking service with the following capabilities: 1) Create bank accounts with unique IDs and an initial balance; suppor...

Coding & Algorithms
27
0
210 people solved
Sep 6, 2025
Snowflake logo
Snowflake
Medium
Software Engineer

Find longest unique-character substring

Given a string s, return the length of the longest substring without repeating characters. Explain and implement an O(n) sliding-window solution using...

Coding & Algorithms
6
0
59 people solved
Sep 6, 2025
Shein logo
Shein
Medium
Software Engineer

Solve array modulo and parentheses tasks

Implement two tasks: 1) Count subarrays by modulo remainder - Input: integer array nums (length n), integers K (1 ≤ K ≤ 10^ 4) and R (0 ≤ R < K). - Ou...

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

Navigate unknown grid to locate target

You control a mouse in an unknown 2D maze. You do not know the maze dimensions or your absolute coordinates. The interface exposes move() → bool (atte...

Coding & Algorithms
2
0
24 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