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
Meta logo
Meta
Hard
Machine Learning EngineerSenior+ AI Locked

Find Words Containing Other Words

This question evaluates string-processing skills, knowledge of substring matching techniques and supporting data structures, and the ability to analyz...

Coding & Algorithms
1
0
30 people solved
Mar 1, 2026
Nextdoor logo
Nextdoor
Hard
Data Engineer

Write SQL for app metrics

You are given a simplified schema for a photo-sharing app: - users(user_id, user_name, joined_at) - photos(photo_id, user_id, created_at) - follows(fo...

Coding & Algorithms
5
0
58 people solved
Mar 1, 2026
Walmart Labs logo
Walmart Labs
Medium
Software Engineer

Compute days until plants stop dying

You are given a row of plants, each with an integer pesticide level. Rules - On each day, any plant with a strictly greater pesticide level than the p...

Coding & Algorithms
19
0
345 people solved
Mar 1, 2026
Walmart Labs logo
Walmart Labs
Medium
Software Engineer Locked

Check whether brackets are balanced

This question evaluates a candidate's competency in string processing and bracket-matching concepts, testing familiarity with linear-time algorithms a...

Coding & Algorithms
5
0
42 people solved
Mar 1, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Rebalance shard ranges under overlap limit

This question evaluates skills in interval and range management, constraint enforcement, and algorithmic problem solving related to overlapping intege...

Coding & Algorithms
40
0
288 people solved
Mar 1, 2026
Codeium logo
Codeium
Medium
Software Engineer

Validate whether a given sequence is a Hamiltonian path

You are given strArr, an array of three strings describing an undirected graph and a proposed vertex visit order: 1. strArr[0]: a comma-separated list...

Coding & Algorithms
3
0
35 people solved
Mar 1, 2026
Codeium logo
Codeium
Medium
Software Engineer

Find the third-largest word by length

Given an array of strings strArr (length ≥ 3), return the third largest word when ranking words by string length in descending order. Ranking rules: -...

Coding & Algorithms
1
0
29 people solved
Mar 1, 2026
Microsoft logo
Microsoft
Hard
Software Engineer

Find all balanced k in a permutation

You are given a permutation \(p\) of length \(n\) containing each integer from \(1\) to \(n\) exactly once. For each \(k\) where \(1 \le k \le n\), de...

Coding & Algorithms
26
0
202 people solved
Mar 1, 2026
Bloomberg logo
Bloomberg
Hard
Software Engineer

Design a data structure for dynamic top‑K frequency

Design a data structure that maintains a multiset of integers and supports the following operations efficiently: Operations - insert(x): Add one occur...

Coding & Algorithms
17
0
185 people solved
Mar 1, 2026
Paradromics logo
Paradromics
Medium
Software Engineer

Implement a hash table with put/get

Problem Implement a simplified hash table (hash map) data structure from scratch. Required API Design a class HashTable with: - HashTable(int numBucke...

Coding & Algorithms
3
0
35 people solved
Mar 1, 2026
Snowflake logo
Snowflake
Easy
Software Engineer Locked

Schedule prerequisite classes with retakes

This question evaluates competency in graph algorithms, dependency resolution, stateful scheduling, and robust error handling within the Coding & Algo...

Coding & Algorithms
14
0
119 people solved
Mar 1, 2026
Snowflake logo
Snowflake
Hard
Software Engineer Locked

Minimize coins with overpay and change

This question evaluates algorithmic optimization and combinatorial reasoning in the coin-change domain, measuring proficiency with efficient numeric m...

Coding & Algorithms
6
0
84 people solved
Mar 1, 2026
Atlassian logo
Atlassian
Hard
Machine Learning Engineer Locked

Compute a moving average on a stream

This question evaluates understanding of streaming data structures, sliding-window aggregation, and the time/space trade-offs involved in maintaining ...

Coding & Algorithms
4
0
39 people solved
Mar 1, 2026
Applied logo
Applied
Medium
Software Engineer Locked

Merge overlapping 2D line segments

This question evaluates computational geometry and algorithmic skills, specifically collinearity detection, geometric segment intersection, merging of...

Coding & Algorithms
4
0
34 people solved
Mar 1, 2026
Salesforce logo
Salesforce
Medium
Software Engineer Locked

Maximize events attended given date ranges

This question evaluates understanding of interval scheduling and efficient algorithm design for allocating limited time-based resources, including con...

Coding & Algorithms
9
0
110 people solved
Mar 1, 2026
Harvey logo
Harvey
Medium
Software Engineer Locked

Implement retrieval and evaluation for a simple RAG

This question evaluates understanding of embedding-based retrieval, cosine similarity ranking, and retrieval evaluation metrics (Recall@10 and MRR@10)...

Coding & Algorithms
10
0
136 people solved
Mar 1, 2026
Coinbase logo
Coinbase
Hard
Software Engineer

Generate NFT metadata and ensure uniqueness

You are implementing an NFT metadata generator. Each NFT is defined by selecting exactly one trait value from each trait category. You must generate a...

Coding & Algorithms
21
0
289 people solved
Mar 1, 2026
MathWorks logo
MathWorks
Easy
Software Engineer

Maximize minimum after K decrements

You are given an integer array A of length N and an integer K. You must perform exactly K operations. In each operation, choose any index i and do A[i...

Coding & Algorithms
3
0
52 people solved
Mar 1, 2026
Snowflake logo
Snowflake
Medium
Software Engineer Locked

Solve three coding rounds

This multi-part question evaluates algorithmic problem-solving and practical implementation skills, covering grid geometry and distance metrics for ne...

Coding & Algorithms
18
0
155 people solved
Mar 1, 2026
OpenAI logo
OpenAI
Hard
Software Engineer Locked

Implement follow graph with snapshots

This question evaluates a candidate's ability to design efficient persistent data structures and versioned state management for time-travel queries in...

Coding & Algorithms
27
1
205 people solved
Mar 1, 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