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
NVIDIA logo
NVIDIA
Hard
Software EngineerSenior+

Count Substrings with No Repeated Characters

Count Substrings with No Repeated Characters Given a lowercase English string s, return the number of nonempty contiguous substrings whose characters ...

Coding & Algorithms
1
0
22 people solved
Jul 16, 2026
Uber logo
Uber
Hard
Software Engineer Locked

Build Quadtree and Find Grid Words

This question evaluates divide-and-conquer tree construction and recursive spatial data structures for the quadtree task, and grid-based search and ba...

Coding & Algorithms
7
0
87 people solved
Jan 26, 2026
Nextdoor logo
Nextdoor
Hard
Data Engineer

Write SQL for basic user metrics

You are given a simplified schema for a fictional social app called Nextagram: - users(user_id PK, username, created_at TIMESTAMP) - follows(follower_...

Coding & Algorithms
5
0
88 people solved
Feb 8, 2026
Meta logo
Meta
Easy
Software Engineer

Implement four coding challenges

You are asked to solve the following four independent coding problems. --- 1) Block Placement Simulator (Tetris-like) You have an empty n x m grid (ro...

Coding & Algorithms
9
0
82 people solved
Feb 8, 2026
Netflix logo
Netflix
Medium
Software Engineer Locked

Compute Minimum Task Completion Time

This question evaluates understanding of graph algorithms (topological sort and DFS), dependency scheduling, cycle detection, and critical-path comput...

Coding & Algorithms
1
0
13 people solved
May 30, 2026
LinkedIn logo
LinkedIn
Medium
Data Scientist

Implement stream random sampling in Python

You are given an unbounded stream of items that cannot be stored entirely in memory. Write Python code to maintain a uniform random sample from the st...

Coding & Algorithms
10
0
82 people solved
Oct 12, 2025
Harvey logo
Harvey
Medium
Software Engineer Locked

In-Memory File System: Create, Track Duplicates, and List

This question evaluates a software engineer's ability to design and implement an in-memory file system, testing data structure selection, path parsing...

Coding & Algorithms
2
0
12 people solved
Jun 20, 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
Nuro logo
Nuro
Hard
Software Engineer

Cluster 3D Points by a Distance Threshold

Implement cluster_points_3d(points, D). Create an undirected edge between two distinct 3D points when their Euclidean distance is strictly less than D...

Coding & Algorithms
0
0
4 people solved
May 9, 2026
Instacart logo
Instacart
Medium
Software Engineer Locked

Find Largest Adjacent Stock Price Change

This question evaluates algorithmic problem-solving and data-manipulation skills, specifically date-based sorting, computing signed versus absolute ad...

Coding & Algorithms
2
0
15 people solved
May 9, 2026
Bytedance logo
Bytedance
Medium
Software Engineer

Solve interval merging and histogram area

The coding round included two algorithm problems: 1. Merge overlapping intervals: Given a list of closed intervals [[start1, end1], [start2, end2], .....

Coding & Algorithms
4
0
60 people solved
Feb 18, 2026
Instacart logo
Instacart
Medium
Backend EngineerSenior+ AI Locked

Fix the Broken Search Filter in a Book Catalog API

This question tests a backend engineer's ability to implement correct filtering logic, including case-insensitive substring matching, whitespace trimm...

Coding & Algorithms
1
0
13 people solved
Jun 19, 2026
Ramp logo
Ramp
Medium
Software Engineer

Implement a multi-level digital recipe manager

Implement a RecipeManager class for a digital recipe manager. The task is progressive (Levels 1–4). You can assume a single-process in-memory implemen...

Coding & Algorithms
29
0
304 people solved
Mar 4, 2026
Google logo
Google
Medium
Software EngineerIntern Locked

Find Minimum Rooms Needed

This question evaluates understanding of interval scheduling and conflict detection in time ranges, along with algorithmic reasoning and appropriate d...

Coding & Algorithms
168
1
1403 people solved
Mar 19, 2026
Harvey logo
Harvey
Medium
Software Engineer Locked

Implement a Cursor-Based Text Editor

This question evaluates understanding of data structures and algorithmic efficiency for mutable sequences and cursor manipulation, including analysis ...

Coding & Algorithms
2
0
37 people solved
Apr 20, 2026
Google logo
Google
Medium
Software Engineer Locked

Choose optimal guesses for green-only Wordle

This question evaluates probabilistic reasoning, expected-value optimization, information partitioning, and algorithmic efficiency in selecting guesse...

Coding & Algorithms
9
1
108 people solved
Oct 14, 2025
LinkedIn logo
LinkedIn
Easy
Data Scientist Locked

How do you sample uniformly from an infinite stream?

This question evaluates understanding of streaming algorithms, randomized sampling and probability, and algorithmic space–time trade-offs involved in ...

Coding & Algorithms
13
0
129 people solved
Feb 1, 2026
Microsoft logo
Microsoft
Easy
Software Engineer

Solve binary-tree reverse printing and LPS

You are given a binary tree node definition: - TreeNode { int val; TreeNode left; TreeNode right; } Answer the following two algorithmic questions. 1)...

Coding & Algorithms
11
0
124 people solved
Dec 24, 2025
Meta logo
Meta
Medium
Software Engineer

Count Distinct Values in a Sorted Array When K Is Small

Count Distinct Values in a Sorted Array When K Is Small Given an integer array sorted in nondecreasing order, return the number of distinct values. Le...

Coding & Algorithms
1
0
12 people solved
Mar 2, 2026
Meta logo
Meta
Medium
Software Engineer

Resolve a cd Path Against the Current Directory

Resolve a cd Path Against the Current Directory Implement path resolution for a simplified Unix-like cd command. cwd is a normalized absolute path. ar...

Coding & Algorithms
0
0
11 people solved
Mar 2, 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