Coding & Algorithms Interview Questions

Practice 3,429 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.4k Questions 368 Companies08.11.2026
Showing 20 results
Role
Meta logo
Meta
Medium
Software Engineer

Find k most frequent elements, discuss O(n)

Find k most frequent elements, discuss O(n) Given an integer array nums of length n and an integer k (where 1 ≤ k ≤ the number of distinct values in n...

Coding & Algorithms
4
0
33 people solved
Jul 27, 2025
Anthropic logo
Anthropic
Medium
Machine Learning Engineer

Implement cluster status tracker

Implement a cluster status tracker. Design a class with methods: update(nodeId, status, timestamp) to record node status updates that may arrive out o...

Coding & Algorithms
19
0
259 people solved
Jul 27, 2025
Amazon logo
Amazon
Medium
Software Engineer

Solve frequency sort and all-pairs sum

Solve frequency sort and all-pairs sum Task 1 — Frequency-based string reorder: Given a string s containing ASCII characters, return a new string whos...

Coding & Algorithms
3
1
33 people solved
Jul 27, 2025
Optiver logo
Optiver
Easy
Data Scientist

Stone Pile Doubling Game: Can One Pile Be Emptied?

You are given two piles of stones containing a and b stones respectively (both piles start non-empty). You repeatedly apply the following move: - Let ...

Coding & Algorithms
0
0
2 people solved
Jul 26, 2025
Adyen logo
Adyen
Medium
Software Engineer

Implement LRU and target-sum combinations

Implement LRU and target-sum combinations Design and implement the following: 1) An in-memory cache with Least Recently Used (LRU) eviction supporting...

Coding & Algorithms
16
0
116 people solved
Jul 26, 2025
Meta logo
Meta
Medium
Software Engineer

Produce asymmetric side views of a binary tree

Produce asymmetric side views of a binary tree Given a binary tree, output two sequences: ( 1) Left-bottom-up view: for each depth, the first node vis...

Coding & Algorithms
2
0
43 people solved
Jul 26, 2025
Meta logo
Meta
Medium
Software Engineer

Remove adjacent duplicate groups repeatedly

Remove adjacent duplicate groups repeatedly Given a string s, repeatedly delete any maximal contiguous group of identical characters whose length is a...

Coding & Algorithms
3
0
37 people solved
Jul 26, 2025
Snowflake logo
Snowflake
Medium
Software Engineer

Transform tree with subtree sum mapping

Transform tree with subtree sum mapping You are given the roots of two complete binary trees T1 and T2 that have identical structure (same shape and n...

Coding & Algorithms
7
0
59 people solved
Jul 26, 2025
Oracle logo
Oracle
Medium
Software Engineer

Determine if robot path is bounded

Determine if robot path is bounded A robot starts at (0, 0) facing North on an infinite grid. It executes a string s consisting of 'G' (move forward 1...

Coding & Algorithms
7
0
69 people solved
Jul 26, 2025
Oracle logo
Oracle
Medium
Software Engineer

Find shortest subarray meeting target sum

Find shortest subarray meeting target sum Given an integer array nums (values may be negative) and an integer T, return the length of the shortest non...

Coding & Algorithms
3
0
57 people solved
Jul 26, 2025
Kneron logo
Kneron
Medium
Software Engineer

Compute sum of minima with removals

Compute sum of minima with removals You are given an array weights[0..n-1] of positive integers representing product weights in a line. Repeat until n...

Coding & Algorithms
2
0
21 people solved
Jul 26, 2025
Amazon logo
Amazon
Medium
Software Engineer

Solve median extremes and segment flips

Solve median extremes and segment flips Part A — Sliding-window median extremes: - Input: an integer k (1 ≤ k ≤ n) and an array nums of length n. - Fo...

Coding & Algorithms
2
0
25 people solved
Jul 26, 2025
Citadel logo
Citadel
Medium
Software Engineer

Explain hash maps and solve array intersection

1) Explain the internal implementation of a hash map: underlying array/bucket layout, hash function choice, collision resolution strategies (separate ...

Coding & Algorithms
12
0
107 people solved
Jul 26, 2025
Pinterest logo
Pinterest
Medium
Software Engineer

Find minimum shuttle transfers

Find minimum shuttle transfers You are given a collection of shuttle loops, each represented by a list of stop IDs that the loop visits in perpetuity....

Coding & Algorithms
9
0
93 people solved
Jul 26, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Find and remove duplicate files

Given a directory tree that may not fit in memory, detect and optionally remove duplicate files. Define the algorithm, including how you handle very l...

Coding & Algorithms
22
0
166 people solved
Jul 26, 2025
Optiver logo
Optiver
Medium
Software Engineer

Validate a Binary Tree Built from Directed Edges

Validate a Binary Tree Built from Directed Edges You are given a list of directed edges. Each edge is a pair (parent, child) of positive-integer node ...

Coding & Algorithms
0
0
5 people solved
Jul 23, 2025
Optiver logo
Optiver
Medium
Software Engineer

Count the Days Between Two Dates

Count the Days Between Two Dates You are given two calendar dates as strings in YYYY-MM-DD format. Return the number of days between them as a non-neg...

Coding & Algorithms
0
0
8 people solved
Jul 23, 2025
Two Sigma logo
Two Sigma
Medium
Software Engineer

Maximum Group of Pairwise Strangers in an Acquaintance Tree

You are given a social network of n people, labeled 0 through n - 1. For some pairs of people, it is known that the two people in the pair know each o...

Coding & Algorithms
0
0
5 people solved
Jul 23, 2025
Two Sigma logo
Two Sigma
Hard
Software Engineer

Compute maximum currency exchange rate

Compute maximum currency exchange rate You are given a set of currencies and the direct exchange rates between some pairs of them. Each direct exchang...

Coding & Algorithms
17
0
147 people solved
Jul 20, 2025
Zillow logo
Zillow
Medium
Machine Learning Engineer

Implement placeholder-based pattern matcher

Implement placeholder-based pattern matcher You are given: 1. A string s that may contain placeholders delimited by the % character. 2. A dictionary d...

Coding & Algorithms
1
0
32 people solved
Jul 18, 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