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

Implement an In-Memory File System

Implement an In-Memory File System The source reports an in-memory file-system exercise but not its exact error serialization or current-directory rem...

Coding & Algorithms
1
0
15 people solved
Apr 28, 2026
Shopify logo
Shopify
Medium
Data Scientist AI

Compute Jaccard Similarity for Lists

Implement a Python function to compute the Jaccard similarity between two lists of strings. `python def jaccard_similarity(a: list[str], b: list[str])...

Coding & Algorithms
1
0
27 people solved
Apr 28, 2026
Amazon logo
Amazon
Medium
Software Engineer AI Locked

Implement a Worker Hours Register

This question evaluates data structures and algorithms skills for temporal event tracking, interval arithmetic, stateful session management, ranking, ...

Coding & Algorithms
14
0
106 people solved
Feb 14, 2026
Docker logo
Docker
Medium
Software Engineer Locked

Evaluate an arithmetic expression

This question evaluates parsing and expression-evaluation skills, specifically handling operator precedence, integer division truncation, multi-digit ...

Coding & Algorithms
5
0
47 people solved
Feb 14, 2026
Clickup logo
Clickup
Medium
Software Engineer

Process document edit events

Implement a line-based document editor. You are given: - an initial document represented as an array of strings, where each string is one line - a lis...

Coding & Algorithms
3
0
59 people solved
Dec 15, 2025
Google logo
Google
Medium
Software Engineer

Recommend top-K movies from similarity graph

Movie Recommendation: Top K You are building a simple movie recommendation feature. Input - A set of movies 0..(M-1). - An undirected similarity graph...

Coding & Algorithms
68
1
529 people solved
Dec 15, 2025
Coursera logo
Coursera
Medium
Software Engineer

Implement plurality and majority voting

You are given an array votes of length n, where each element is a candidate identifier (string or integer). Implement two voting systems: 1) Plurality...

Coding & Algorithms
5
0
51 people solved
Dec 15, 2025
OpenAI logo
OpenAI
Hard
Software Engineer

Implement an in-memory SQL-like table

Problem Implement a simple in-memory database for one table. All values are strings. Each row is identified by a rowKey (string). Each row contains co...

Coding & Algorithms
64
0
1069 people solved
Dec 15, 2025
OpenAI logo
OpenAI
Hard
Software Engineer

Implement credit ledger with out-of-order timestamps

Problem You are implementing a GPU credit ledger that supports adding credits, charging credits, and querying balances. Requests can arrive in any tim...

Coding & Algorithms
140
1
950 people solved
Dec 15, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Maximize profit from non-overlapping jobs

You are given up to N = 200,000 jobs; each job i has a start time s_i, end time e_i (s_i < e_i), and reward w_i. Select a subset of non-overlapping jo...

Coding & Algorithms
13
0
186 people solved
Jul 16, 2025
Google logo
Google
Medium
Software Engineer

Maximize coins collected by tokens jumping +3

You are given a single-player board game represented by a string board of length N (1 ≤ N ≤ 100). Each character is one of: - '.': empty cell - 'T': a...

Coding & Algorithms
5
0
53 people solved
Feb 13, 2026
Square logo
Square
Medium
Software EngineerSenior+

Build a Trust-Aware BIN Database

Build a Trust-Aware BIN Database Implement process_bin_operations(operations) for an in-memory database of card-number prefixes. A prefix identifies a...

Coding & Algorithms
1
0
14 people solved
Apr 27, 2026
Meta logo
Meta
Hard
Software Engineer AI

Solve Two Backtracking Array Problems

You will solve two independent coding problems. For each problem, first discuss edge cases, then implement a correct solution, and finally explain how...

Coding & Algorithms
36
0
292 people solved
Apr 27, 2026
Netflix logo
Netflix
Hard
Data Engineer Locked

Implement phrase search and JSON path

This question evaluates the ability to build an inverted index for in-memory exact phrase search and to implement JSON path traversal with wildcard ma...

Coding & Algorithms
5
0
49 people solved
Dec 13, 2025
Google logo
Google
Medium
Software Engineer Locked

Find shortest relationship path using BFS

This question evaluates proficiency in graph representations and traversal algorithms—specifically BFS and adjacency-structure construction—for comput...

Coding & Algorithms
21
0
143 people solved
Feb 12, 2026
Datadog logo
Datadog
Medium
Software Engineer Locked

Build span trees from unordered trace spans

This question evaluates skill in reconstructing hierarchical relationships from unordered span records, testing understanding of tree structure assemb...

Coding & Algorithms
21
0
171 people solved
Feb 12, 2026
Confluent logo
Confluent
Easy
Software Engineer Locked

Process pod logs with global increments and pop-min

This question evaluates understanding of data structures—particularly priority queues/heaps—and techniques for efficiently handling global/bulk update...

Coding & Algorithms
15
0
171 people solved
Feb 12, 2026
Together AI logo
Together AI
Medium
Software Engineer

Detect cycles and break them in pod dependencies

You are given dependencies between software pods. Each dependency is a directed edge u -> v meaning pod u must be built/installed before pod v. Part 1...

Coding & Algorithms
12
0
160 people solved
Feb 12, 2026
Samsung logo
Samsung
Easy
Software Engineer

Count islands in a binary grid

Problem You are given an m x n grid of characters where each cell is either '1' (land) or '0' (water). An island is formed by connecting adjacent land...

Coding & Algorithms
6
0
49 people solved
Feb 12, 2026
SoFi logo
SoFi
Medium
Software Engineer Locked

Format words into wrapped/justified lines

This question evaluates practical programming skills in string processing, greedy packing, and careful handling of spacing and edge cases, and falls u...

Coding & Algorithms
20
1
214 people solved
Feb 12, 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