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

Design in-memory payment and friendship system

Design and implement an in-memory payment system with simple social features. The system processes a sequence of requests that can: 1. Register a user...

Coding & Algorithms
15
0
190 people solved
Dec 8, 2025
Stripe logo
Stripe
Medium
Software Engineer

Implement account scheduler with locking and LRU

Design a class AccountScheduler that manages the time-based availability of a fixed set of account IDs. Initialization You are given: - accounts: a li...

Coding & Algorithms
5
1
41 people solved
Dec 8, 2025
Snapchat logo
Snapchat
Hard
Software Engineer

Compute longest increasing path in matrix

You are given an m x n grid (matrix) of integers grid, where m >= 1 and n >= 1. A path in the matrix is a sequence of cells where: - You may move from...

Coding & Algorithms
5
0
67 people solved
Dec 8, 2025
Snapchat logo
Snapchat
Hard
Software Engineer

Count ways to decode digit string

You are given a string s consisting of digits '0' to '9'. The string encodes a message using the following mapping: - '1' → A, '2' → B, ..., '26' → Z....

Coding & Algorithms
12
0
83 people solved
Dec 8, 2025
Google logo
Google
Hard
Software Engineer

Shuffle array using random integer API

You are given an array nums of length n representing a deck of distinct cards. You do not have access to a built-in shuffle function, but you are give...

Coding & Algorithms
6
0
79 people solved
Dec 8, 2025
Google logo
Google
Hard
Software Engineer

Find longest duplicated substring

You are given a string s consisting of lowercase English letters. A substring of s is any contiguous sequence of characters, i.e., s[i..j) for 0 ≤ i <...

Coding & Algorithms
10
0
141 people solved
Dec 8, 2025
Netflix logo
Netflix
Medium
Software Engineer

Group users by same last K watched movies

You are given a list of users' movie-watching histories. Each user’s history is an ordered list of movie IDs in the order they were watched (earliest ...

Coding & Algorithms
10
0
185 people solved
Dec 8, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement integer division without using division

You are given two 32-bit signed integers dividend and divisor. Implement a function that divides dividend by divisor and returns the integer quotient,...

Coding & Algorithms
7
0
53 people solved
Dec 8, 2025
Meta logo
Meta
Medium
Software Engineer

Validate complete binary tree

You are given the root of a binary tree. A complete binary tree is defined as a binary tree in which: 1. Every level, except possibly the last, is com...

Coding & Algorithms
1
0
23 people solved
Dec 8, 2025
Databricks logo
Databricks
Medium
Software Engineer

Find first CIDR block covering IP

You are given: - A single IPv4 address as a string, e.g. "192.168.1.5". - A list of CIDR blocks (IPv4), each as a string in the form "a.b.c.d/x", wher...

Coding & Algorithms
11
0
87 people solved
Dec 8, 2025
Coinbase logo
Coinbase
Medium
Software Engineer

Implement basic pagination for a list

You are given: - A zero-indexed array of items items (you can assume it fits in memory). - An integer pageSize > 0. Design and implement a pagination ...

Coding & Algorithms
16
0
191 people solved
Dec 8, 2025
Scale AI logo
Scale AI
Medium
Software Engineer

Compute clock hand angle with seconds and milliseconds

You are given a time in the format "HH:MM", representing a 24-hour clock time with hours and minutes. Extend this to potentially include seconds and m...

Coding & Algorithms
10
0
160 people solved
Dec 8, 2025
Google logo
Google
Hard
Machine Learning Engineer

Design data structure similar to LRU cache

You are asked to design and implement a data structure that behaves similarly to an LRU (Least Recently Used) cache, but with a small variation: - The...

Coding & Algorithms
5
1
57 people solved
Dec 8, 2025
Google logo
Google
Easy
Software Engineer

Find largest digit-sharing subset

You are given an array of N integers. Each integer has exactly two decimal digits (i.e., each element is between 10 and 99 inclusive). You want to cho...

Coding & Algorithms
10
0
112 people solved
Dec 8, 2025
Rokt logo
Rokt
Easy
Software Engineer

Implement basic calculator with four operations

Implement a basic arithmetic expression evaluator. Problem You are given a string s representing a mathematical expression containing non-negative int...

Coding & Algorithms
4
0
30 people solved
Dec 6, 2025
Stripe logo
Stripe
Easy
Software Engineer

Implement stateful connection router simulator

You are implementing a simplified connection router / load balancer for a Jupyter-like multi-tenant server system. There are N target servers, indexed...

Coding & Algorithms
2
0
30 people solved
Dec 6, 2025
Google logo
Google
Easy
Software Engineer

Maximize coins with tokens moving by +3

You are given a 1D board represented by a string s of length n. Each character is one of: - '.' — an empty cell - 'C' — a cell containing exactly one ...

Coding & Algorithms
21
2
203 people solved
Dec 5, 2025
Meta logo
Meta
Medium
Data Scientist

Detect earliest collision among moving cars

You are given n vehicles with kinematics parameters. A “collision” means two vehicles occupy the same position at the same time. Assume continuous tim...

Coding & Algorithms
4
0
30 people solved
Dec 4, 2025
Meta logo
Meta
Hard
Data Engineer

Compute Max Score From Up to 3 Categories

You are implementing a scoring function for a library summer reading program. Each book a student read is represented as a tuple (category: str, point...

Coding & Algorithms
7
0
62 people solved
Dec 2, 2025
Patreon logo
Patreon
Medium
Software Engineer

Evaluate word-guess feedback with repeats

You are implementing feedback for a Wordle-like guessing game. Part 1 — Produce feedback for one guess You are given two strings of equal length guess...

Coding & Algorithms
13
0
100 people solved
Dec 2, 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