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
Pinterest logo
Pinterest
Medium
Software Engineer Locked

Solve Four Interview Coding Problems

This question set evaluates algorithmic problem-solving skills including graph traversal and itinerary reconstruction, time-sorted search and binary s...

Coding & Algorithms
8
0
60 people solved
Feb 1, 2026
Meta logo
Meta
Medium
Software Engineer

Solve tree view and parentheses cleanup

Solve the following two algorithm problems. 1. Right-side view of a binary tree Given the root of a binary tree, return the values of the nodes that w...

Coding & Algorithms
6
0
43 people solved
Feb 1, 2026
Uber logo
Uber
Medium
Data Scientist

Move zeros to the front

Given an integer array nums, move all elements equal to 0 to the beginning of the array while preserving the relative order of all non-zero elements. ...

Coding & Algorithms
4
1
55 people solved
Feb 1, 2026
Anthropic logo
Anthropic
Hard
Software Engineer Locked

Design stack with O(1) minimum query

This question evaluates understanding of stack-based data structures, constant-time operation constraints, and handling edge cases such as empty queri...

Coding & Algorithms
57
0
432 people solved
Feb 1, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Extract stream prefix before stop token

This question evaluates streaming string processing, incremental substring detection across chunk boundaries, and memory-efficient algorithm design fo...

Coding & Algorithms
3
0
62 people solved
Feb 1, 2026
Microsoft logo
Microsoft
Medium
Software EngineerNew Grad Locked

Build a CSV Query Engine

This question evaluates proficiency in text parsing, data modeling, and implementing in-memory query semantics, including CSV parsing rules, type infe...

Coding & Algorithms
5
0
41 people solved
Jan 31, 2026
IBM logo
IBM
Medium
Software Engineer

Find minimum subarray length with k distinct integers

Given an integer array arr and an integer k, find the minimum length of a contiguous subarray that contains exactly k distinct integer values. Return ...

Coding & Algorithms
5
0
60 people solved
Jan 31, 2026
Snapchat logo
Snapchat
Hard
Machine Learning Engineer

Implement calculator and graph connectivity

Answer the following coding problems: 1. Implement an arithmetic expression evaluator. Given a string containing non-negative integers, spaces, +, -, ...

Coding & Algorithms
6
0
53 people solved
Jan 30, 2026
Meta logo
Meta
Hard
Machine Learning Engineer

Solve Three Algorithmic Problems

Three coding questions were mentioned: 1. Second-largest distinct permutation Given an array of integers that may contain duplicates, consider all ...

Coding & Algorithms
5
0
40 people solved
Jan 30, 2026
Citadel logo
Citadel
Hard
Data Scientist

Sort a nearly sorted array

Given an array of length \(n\) in which every element is at most \(k\) positions away from its location in the fully sorted order, design an algorithm...

Coding & Algorithms
4
0
79 people solved
Jan 30, 2026
Netflix logo
Netflix
Medium
Software Engineer

Return valid task order from prerequisites

You are given N tasks labeled 0..N-1 and a list of directed dependency pairs [(a,b), ...] meaning task a must be done before task b. 1) Return one val...

Coding & Algorithms
9
0
129 people solved
Jan 30, 2026
Instacart logo
Instacart
Hard
Software EngineerSenior+ Locked

Implement store, evaluator, and parser

This question evaluates implementation skills in data structures and algorithms, covering time-based versioning and TTL in an in-memory key-value stor...

Coding & Algorithms
11
0
98 people solved
Jan 29, 2026
Uber logo
Uber
Medium
Software Engineer

Return a Package Build Order

You are given an API: `python get_dependencies(package) -> list[str] ` It returns the direct dependencies of a given package. If package A depends on ...

Coding & Algorithms
4
0
58 people solved
Jan 28, 2026
Pinterest logo
Pinterest
Medium
Software Engineer Locked

Solve Two Grid Search Problems

This question evaluates proficiency in graph traversal on grids, specifically competencies in identifying connected components and modeling propagatio...

Coding & Algorithms
11
0
76 people solved
Jan 28, 2026
Snapchat logo
Snapchat
Medium
Backend Engineer

Count Cross-Group Employee Pairs

You are given n employees labeled from 0 to n - 1 and a list of relationships relations, where each pair [a, b] means employees a and b belong to the ...

Coding & Algorithms
6
0
57 people solved
Jan 28, 2026
Uber logo
Uber
Medium
Software Engineer

Find shortest jumps in circular array

You are given a circular array arr of length n. From index i, you may jump exactly arr[i] steps either to the left or to the right (wrapping around th...

Coding & Algorithms
11
0
111 people solved
Jan 28, 2026
Bridge.Xyz logo
Bridge.Xyz
Medium
Software Engineer

Normalize a file path

Given an absolute Unix-style file path as a string, return its canonical normalized form. Rules: - The input always starts with /. - A single . means ...

Coding & Algorithms
5
0
89 people solved
Jan 27, 2026
Apple logo
Apple
Medium
Software Engineer

Solve 15 common interview problems

Below are fifteen independent coding problems commonly discussed in software engineering interviews. For each one, write an efficient algorithm and be...

Coding & Algorithms
8
0
83 people solved
Jan 27, 2026
Amazon logo
Amazon
Medium
Software Engineer

Maximize protected population with one-step guard shifts

There are n cities in a line (1-indexed). You are given: - population[1..n]: population of each city - unit: a binary string of length n, where unit[i...

Coding & Algorithms
22
0
153 people solved
Jan 27, 2026
Amazon logo
Amazon
Medium
Software Engineer

Maximize weighted subsequence pairs with wildcards

You are given a string s of length n consisting only of characters '0', '1', and '!'. Each '!' can be replaced by either '0' or '1'. For the final bin...

Coding & Algorithms
113
0
1013 people solved
Jan 27, 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