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

Solve server updates and grid inconvenience minimization

1) You are given an integer array server of length n, where server[i] is the number of requests the i-th server can process. Over multiple days, you r...

Coding & Algorithms
5
0
78 people solved
Sep 6, 2025
Oracle logo
Oracle
Medium
Software Engineer

Solve three DSA problems: trie, window, intervals

1) Design and implement an autocomplete service. Support insert(word) to add a word and suggest(prefix) to return up to five existing words that start...

Coding & Algorithms
4
0
79 people solved
Sep 6, 2025
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Solve Three Coding Interview Problems

This set of problems evaluates competency in algorithmic problem-solving, including merging sorted arrays with duplicate elimination, reasoning about ...

Coding & Algorithms
1
0
38 people solved
Feb 7, 2026
Box logo
Box
Medium
Software Engineer

Compute Top-K word frequencies under a path

Compute Top-K word frequencies under a path Given a filesystem path that may contain nested subdirectories and files, compute the top K most frequent ...

Coding & Algorithms
25
0
177 people solved
Aug 1, 2025
Microsoft logo
Microsoft
Medium
Machine Learning EngineerSenior+ Locked

Find Top K Largest Elements

This question evaluates a candidate's skill in algorithmic selection and data-structure usage for extracting top-k elements from large arrays, emphasi...

Coding & Algorithms
3
0
28 people solved
Feb 5, 2026
Figma logo
Figma
Medium
Machine Learning Engineer Locked

Implement Layer History and Grid Counting

This question evaluates a candidate's proficiency in mutable state management and reversible operations through implementing an undo/redo layer editor...

Coding & Algorithms
29
0
210 people solved
Mar 25, 2026
Arista logo
Arista
Easy
Software Engineer

Remove Target Values from a Linked List

Given the head of a singly linked list and an integer target, remove every node whose value equals target and return the new head of the list. The tar...

Coding & Algorithms
4
0
55 people solved
Mar 25, 2026
Netflix logo
Netflix
Medium
Software Engineer

Implement weighted-eviction cache

Question Design and implement a weighted cache supporting get(key) and put(key, value, weight) operations. The cache has a total weight limit; when in...

Coding & Algorithms
22
0
110 people solved
Jul 29, 2025
Amazon logo
Amazon
Medium
Software Engineer Locked

Maximize Value Under a Budget

This question evaluates combinatorial optimization and algorithm design skills for resource-constrained selection problems, focusing on concepts exemp...

Coding & Algorithms
1
0
12 people solved
May 22, 2026
Meta logo
Meta
Medium
Software EngineerSenior+ Locked

Solve Tree Diameter and Palindromic Counts

This two-problem prompt evaluates proficiency in tree algorithms and recursion for computing longest paths in binary trees, along with string processi...

Coding & Algorithms
2
0
16 people solved
May 21, 2026
Uber logo
Uber
Medium
Data ScientistNew Grad Locked

Implement FizzBuzz

This question evaluates basic programming and algorithmic reasoning, including control flow, modular arithmetic, string handling, and the ability to a...

Coding & Algorithms
4
0
64 people solved
Mar 22, 2026
LinkedIn logo
LinkedIn
Medium
Software Engineer Locked

Can You Place N Objects?

This question evaluates array traversal, adjacency-constraint reasoning, and greedy placement intuition, emphasizing handling of boundary conditions a...

Coding & Algorithms
8
0
71 people solved
Mar 22, 2026
Microsoft logo
Microsoft
Medium
Software Engineer

Find the Best Connected Strength for Every Tree Node

Find the Best Connected Strength for Every Tree Node A tree contains n neurons. Each neuron is either strong or weak. Assign weight +1 to a strong neu...

Coding & Algorithms
1
0
15 people solved
May 20, 2026
Bytedance logo
Bytedance
Hard
Software Engineer Locked

Count Target-Sum Paths in an N-ary Tree

This question evaluates a candidate's competency in tree data structures and traversal algorithms, specifically counting path sums in N-ary trees and ...

Coding & Algorithms
1
0
12 people solved
May 20, 2026
J.P. Morgan logo
J.P. Morgan
Medium
Software EngineerIntern

Minimize Operations to Balance Shipments

A shop has n item types, where quantity[i] is the positive integer quantity of the i-th item type. The item types must be shipped in two non-empty con...

Coding & Algorithms
1
0
10 people solved
Mar 21, 2026
Snowflake logo
Snowflake
Hard
Software Engineer

Design transactional in-memory key-value store

Problem Design and implement an in-memory key–value store that supports basic operations plus transactions. Core API Implement the following operation...

Coding & Algorithms
32
0
273 people solved
Nov 4, 2025
Meta logo
Meta
Hard
Machine Learning Engineer Locked

Simulate Monster Team Battles

This question evaluates a candidate's ability to model stateful simulations and implement deterministic battle mechanics with clean data structures an...

Coding & Algorithms
1
0
21 people solved
May 19, 2026
Amazon logo
Amazon
Medium
Software EngineerIntern Locked

Count Connected Components in an Undirected Graph

This question evaluates understanding of graph connectivity and cycle detection, measuring competency in reasoning about connected components and the ...

Coding & Algorithms
1
0
16 people solved
May 19, 2026
Imc logo
Imc
Medium
Software Engineer

Find k-th recipient in command propagation order

Chain of Command (k-th Receiver in DFS-by-Child-Id Order) A company org chart forms a rooted tree with n people (nodes), labeled 1..n. You are given a...

Coding & Algorithms
8
0
104 people solved
Dec 15, 2025
Jump Trading logo
Jump Trading
Medium
Software Engineer

Explain C++ vector, unordered_map, and virtual functions

Explain C++ vector, unordered_map, and virtual functions In C++, explain: - The amortized and worst-case time complexity of vector::push_back, and how...

Coding & Algorithms
25
0
183 people solved
Jul 16, 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