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

Min deletions to avoid overlap in first k

This question evaluates array and sequence manipulation skills, set-based reasoning about value overlap, and the ability to compute minimal edits whil...

Coding & Algorithms
20
0
342 people solved
Feb 12, 2026
Ramp logo
Ramp
Medium
Software Engineer

Multi-Level Warehouse Storage with Weighted Retrieval

Multi-Level Warehouse Storage with Weighted Retrieval You are building the in-memory engine for an automated warehouse. The warehouse is a stack of ho...

Coding & Algorithms
0
0
7 people solved
Feb 11, 2026
Meta logo
Meta
Medium
Software EngineerSenior+ AI

Solve Matrix, Tree, Nested, LCA, Maze Tasks

Answer the following independent coding tasks. For each task, implement a clean API, handle edge cases, and analyze time and space complexity. 1. Trav...

Coding & Algorithms
0
0
7 people solved
Feb 11, 2026
Snowflake logo
Snowflake
Medium
Software Engineer

Find Shortest Grid Path

You are given an m x n grid where 0 represents an open cell and 1 represents a blocked cell. You are also given a start cell (sr, sc) and a target cel...

Coding & Algorithms
18
0
147 people solved
Feb 11, 2026
NVIDIA logo
NVIDIA
Easy
Software Engineer

Implement encode/decode for list of strings

You are given a list of strings (may include digits and symbols). Implement two methods: - encode(List<String> input) -> String: converts the list int...

Coding & Algorithms
4
0
81 people solved
Feb 11, 2026
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Maximize concatenation length with unique chars

This question evaluates understanding of string manipulation, set-based uniqueness constraints, and combinatorial subset selection for maximizing conc...

Coding & Algorithms
3
0
47 people solved
Feb 11, 2026
Uber logo
Uber
Hard
Software Engineer

Check if each prefix forms 1..k permutation

You are given an integer array arr of length n that is a permutation of the numbers 1..n (each number appears exactly once), but in arbitrary order. F...

Coding & Algorithms
20
0
204 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Compute product of array except self

This question evaluates understanding of array manipulation, modular arithmetic, and algorithmic optimization by requiring computation of per-element ...

Coding & Algorithms
2
0
42 people solved
Feb 11, 2026
Uber logo
Uber
Medium
Software Engineer

Find minimum reversals to orient edges away from root

You are given a connected graph with n nodes labeled 0..n-1 and n-1 directed edges. If you ignore edge directions, the edges form a tree. Each directe...

Coding & Algorithms
34
0
249 people solved
Feb 11, 2026
Uber logo
Uber
Medium
Software Engineer

Compute final prices with next smaller discount

You are given an integer array prices of length n, where prices[i] is the original price of the i-th item. For each item i, find the first index j > i...

Coding & Algorithms
6
0
83 people solved
Feb 11, 2026
Citadel logo
Citadel
Easy
Software Engineer Locked

Implement LRU/LFU cache with custom eviction

This question evaluates proficiency in cache design and data-structure implementation, focusing on eviction policies (LRU, LFU), metadata tracking for...

Coding & Algorithms
24
0
238 people solved
Feb 11, 2026
Instacart logo
Instacart
Hard
Software Engineer Locked

Implement worker time and payroll tracker

This question evaluates skills in designing in-memory data structures and algorithms for temporal event handling, interval arithmetic, stateful toggle...

Coding & Algorithms
33
0
282 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Implement idempotent request handling with idempotency keys

This question evaluates understanding of idempotency semantics, idempotency-key handling, concurrency control, synchronization, and in-memory TTL-base...

Coding & Algorithms
5
0
43 people solved
Feb 11, 2026
Citadel logo
Citadel
Medium
Software EngineerIntern

Design dynamic weighted random sampling with updates

Problem: Support weighted random sampling with insert/delete Design a data structure that maintains a dynamic set of items, each with a positive integ...

Coding & Algorithms
11
0
147 people solved
Feb 11, 2026
Ge logo
Ge
Medium
Software Engineer

Count visible people to the right

Problem You are given an array heights of length n, where heights[i] is the height of the i-th person standing in a line from left to right. For each ...

Coding & Algorithms
3
0
25 people solved
Feb 11, 2026
TikTok logo
TikTok
Medium
Software Engineer

Delete nodes in linked list and binary tree

You are asked to solve two short coding tasks. You may assume standard node definitions: - Singly linked list node: val, next - Binary tree node: val,...

Coding & Algorithms
3
0
69 people solved
Feb 11, 2026
Salesforce logo
Salesforce
Medium
Software Engineer Locked

Implement an LFU cache with O(1) operations

This question evaluates a candidate's ability to design and implement efficient data structures for caching, including understanding frequency-based e...

Coding & Algorithms
5
0
61 people solved
Feb 11, 2026
Apple logo
Apple
Hard
Software Engineer Locked

Implement a lazy inorder traversal iterator

This question evaluates understanding of binary tree traversal and iterator design, specifically the implementation of a lazy inorder iterator under t...

Coding & Algorithms
7
0
74 people solved
Feb 11, 2026
Apple logo
Apple
Hard
Software Engineer Locked

Count subarrays with sum equals k

This question evaluates a candidate's competency in array algorithms and reasoning about contiguous subarray sums, including correct handling of negat...

Coding & Algorithms
23
0
171 people solved
Feb 11, 2026
Meta logo
Meta
Medium
Software Engineer

Extend cloud file system with copy and compression

In-Memory Cloud File System V2: Copy, Capacity Updates, Compress/Decompress Design an in-memory file system with per-user quotas and additional operat...

Coding & Algorithms
9
0
71 people solved
Feb 11, 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