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
Roblox logo
Roblox
Medium
Software EngineerSenior+ Locked

Most Frequent Call Stack from Profiler Samples

This question evaluates a candidate's ability to design an efficient hashing and frequency-counting solution over sequences, along with careful handli...

Coding & Algorithms
1
0
13 people solved
Jun 10, 2026
DoorDash logo
DoorDash
Medium
Software Engineer Locked

Validate a Shopping Cart

This question evaluates the ability to implement robust input and business-rule validation for shopping-cart items, including data integrity checks, i...

Coding & Algorithms
7
0
51 people solved
Jun 10, 2026
Grammarly logo
Grammarly
Hard
Software Engineer

Solve interval merge and string dedup problems

You are given three coding questions from a phone screen. Solve each independently. 1) Merge overlapping intervals Input: A list of intervals interval...

Coding & Algorithms
35
0
248 people solved
Oct 22, 2025
Brex logo
Brex
Medium
Software Engineer

Debug and Explain Fixes

Given a small codebase with failing unit tests, identify the root causes of the failures, fix the bugs, and explain the defects you found. Add minimal...

Coding & Algorithms
17
0
294 people solved
Aug 14, 2025
Goldman Sachs logo
Goldman Sachs
Medium
Software Engineer

Count segments and optimize 3-server assignment

There are two independent programming tasks. --- Problem 1: Transaction Segments You are given: - An integer n, the length of an array. - An integer k...

Coding & Algorithms
19
0
262 people solved
Dec 7, 2025
Affirm logo
Affirm
Medium
Software Engineer

Aggregate Loans by Ultimate Parent Company

Aggregate Loans by Ultimate Parent Company Each company has at most one direct parent. For every company loan, follow the parent chain to its ultimate...

Coding & Algorithms
0
0
6 people solved
Apr 23, 2026
Shopify logo
Shopify
Easy
Software Engineer

Simulate rover movement on a grid

You are building a rover navigation simulator. The exercise is incremental: you implement a single rover on a 2D grid, then extend the design to many ...

Coding & Algorithms
66
0
574 people solved
Jan 27, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer

Implement a simplified grep with extensible flags

Problem Implement a simplified version of grep that searches a text file and returns the lines that match a given query string. You should focus on cl...

Coding & Algorithms
9
1
187 people solved
Dec 15, 2025
Bloomberg logo
Bloomberg
Easy
Software Engineer

Solve word path in grid and trapped water

You are given two independent programming tasks. --- Problem 1: Check if a word exists in a 2D character grid You are given a 2D grid board of charact...

Coding & Algorithms
14
0
153 people solved
Nov 25, 2025
OpenAI logo
OpenAI
Hard
Machine Learning Engineer Locked

Search Monster Battle Strategies

This question evaluates algorithmic problem-solving around deterministic simulation and state-space exploration, focusing on handling transient state ...

Coding & Algorithms
26
0
208 people solved
Apr 8, 2026
Amazon logo
Amazon
Easy
Data Engineer

Solve two string problems

You are asked to solve the following two coding problems. 1. Count unique Morse code translations You are given an array of lowercase English w...

Coding & Algorithms
7
0
106 people solved
Jan 24, 2026
Ramp logo
Ramp
Medium
Software Engineer

Find an Exit in a URL Maze

You are given a starting URL for a web-based maze. Each URL represents one room in the maze. Your task is to write a program that discovers whether th...

Coding & Algorithms
35
0
430 people solved
Apr 21, 2026
Thumbtack logo
Thumbtack
Medium
Data Scientist

Implement TF–IDF with sparse matrices

Implement TF–IDF from Scratch (Python + NumPy/SciPy) You are given a list of documents (plain strings). Implement a TF–IDF vectorizer from scratch — n...

Coding & Algorithms
13
0
110 people solved
Oct 13, 2025
LinkedIn logo
LinkedIn
Medium
Data EngineerSenior+

Implement a stack supporting max and popMax

Design a data structure that behaves like a stack but also supports retrieving and removing the current maximum value. Implement a class MaxStack with...

Coding & Algorithms
9
0
78 people solved
Feb 2, 2026
Gsa logo
Gsa
Hard
Data Scientist

Optimize Matrix-Chain Multiplication

Implement minimum_matrix_chain_cost(dimensions). There are n = len(dimensions) - 1 matrices. Matrix A_i has shape dimensions[i-1] x dimensions[i] for ...

Coding & Algorithms
0
0
2 people solved
Jun 26, 2026
Figma logo
Figma
Medium
Data Engineer

Write SQL for first share and closest collaborator

You are given event data about users viewing design files. Assume the following tables: - files(file_id, creator_id) - creator_id is a VARCHAR user ...

Coding & Algorithms
34
0
288 people solved
Jan 20, 2026
Meta logo
Meta
Medium
Software Engineer

Implement BFS-based maze solver

Maze Printing and BFS Solver You are given a 2D grid representing a maze. Each cell of the grid is one of: - '#' – wall (cannot be passed) - '.' – emp...

Coding & Algorithms
33
0
325 people solved
Dec 7, 2025
Databricks logo
Databricks
Medium
Software Engineer

Track Customer Revenue and Referral Revenue

Track Customer Revenue and Referral Revenue Problem Implement a top-level function that processes an in-memory customer revenue tracker through a lite...

Coding & Algorithms
2
1
26 people solved
Apr 18, 2026
Adobe logo
Adobe
Medium
Software Engineer Locked

Build a React team builder with role constraints

This question evaluates frontend React skills including component state management, enforcing role-based constraints and invariants, handling user int...

Coding & Algorithms
8
0
107 people solved
Feb 11, 2026
Asana logo
Asana
Medium
Software Engineer

Implement core puzzle/array/grid routines

You may be asked to solve one or more of the following coding exercises (write clean, testable code; discuss time/space complexity): 1) Jigsaw assembl...

Coding & Algorithms
44
0
367 people solved
Jan 7, 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