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 EngineerIntern Locked

Find shortest subarray with ≥k distinct integers

This question evaluates understanding of array algorithms, handling of distinct-element counting, and the ability to design time- and space-efficient ...

Coding & Algorithms
5
0
40 people solved
Jan 6, 2026
Google logo
Google
Medium
Software Engineer Locked

Answer parity-alternation range queries

This question evaluates a candidate's ability to reason about array properties and design efficient range-query processing for alternating-parity suba...

Coding & Algorithms
9
0
77 people solved
Jan 6, 2026
Google logo
Google
Medium
Software Engineer Locked

Find median of merged RLE arrays

The question evaluates understanding of run-length encoding, order-statistics (median) computation, and efficient merging of frequency-annotated seque...

Coding & Algorithms
12
0
167 people solved
Jan 6, 2026
NVIDIA logo
NVIDIA
Medium
Software EngineerSenior+ Locked

Compute top-N items from log stream

This question evaluates the ability to aggregate frequencies and compute top-N results from logs, covering competencies in frequency counting, top-k a...

Coding & Algorithms
2
0
33 people solved
Jan 6, 2026
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Implement solutions to several coding tasks

This multipart prompt evaluates algorithmic problem-solving and data-structure design skills across several areas: finding a minimum in a rotated sort...

Coding & Algorithms
3
0
62 people solved
Jan 5, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Solve counting and frequency coding tasks

This question evaluates algorithmic skills in counting, frequency analysis, constraint-based pair counting, and stream-oriented tokenization and ranki...

Coding & Algorithms
3
0
43 people solved
Jan 5, 2026
Snapchat logo
Snapchat
Hard
Software Engineer

Compute shortest path in a 2D grid

Given an m x n grid where: - 0 represents an empty cell you can move through - 1 represents a blocked cell you cannot enter - movement is allowed in 4...

Coding & Algorithms
3
0
39 people solved
Jan 4, 2026
Google logo
Google
Medium
Software Engineer Locked

Generate all subsets (handle duplicates)

This question evaluates understanding of power-set generation and handling of duplicate elements, measuring competency in combinatorics, enumeration t...

Coding & Algorithms
8
0
65 people solved
Jan 4, 2026
Plymouth Rock Assurance Corporation logo
Plymouth Rock Assurance Corporation
Medium
Data ScientistIntern

Compute Fibonacci Numbers

Write a function that returns the nth Fibonacci number. Definitions and requirements: - Use zero-based indexing: fib(0) = 0, fib(1) = 1. - For n >= 2,...

Coding & Algorithms
1
0
19 people solved
Jan 3, 2026
Oracle logo
Oracle
Medium
Data ScientistIntern Locked

Count Enclosed Islands in a Grid

This question evaluates grid traversal and graph concepts such as connected-component detection, boundary-condition reasoning, and algorithmic time/sp...

Coding & Algorithms
3
0
29 people solved
Jan 3, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Check palindrome and find next larger palindrome

This question evaluates proficiency in string and numeric manipulation, specifically palindrome detection and generation of the next strictly larger n...

Coding & Algorithms
4
0
44 people solved
Jan 3, 2026
Bytedance logo
Bytedance
Hard
Data Engineer

Maximize watch time under adjacency constraint

You are given a sequence of videos in a feed. - Input: - An integer array duration[1..n], where duration[i] is the length of video i in seconds. -...

Coding & Algorithms
4
0
49 people solved
Jan 2, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Implement memcpy with misaligned addresses

This question evaluates a candidate's understanding of low-level memory manipulation, pointer alignment, and the implementation of efficient byte-copy...

Coding & Algorithms
3
0
43 people solved
Jan 2, 2026
Stripe logo
Stripe
Medium
Software Engineer Locked

Assign tasks to workers with types and accounts

This question evaluates algorithmic scheduling and dynamic resource-allocation skills, including priority-queue/heap usage, time-based simulation, and...

Coding & Algorithms
5
0
74 people solved
Jan 2, 2026
Snapchat logo
Snapchat
Hard
Software Engineer Locked

Implement a dictionary without built-in Dictionary

This question evaluates understanding of hash tables and low-level data-structure implementation, including hashing, collision resolution, resizing/re...

Coding & Algorithms
8
0
60 people solved
Jan 2, 2026
Jerry.Ai logo
Jerry.Ai
Medium
Software Engineer

Determine a one-step string transformation

Given two lowercase strings source and target, determine whether target can be obtained from source using at most one of the following operations, and...

Coding & Algorithms
0
0
16 people solved
Jan 1, 2026
LinkedIn logo
LinkedIn
Medium
Software Engineer

Design a stack with max removal

Design a stack-like data structure for integers that supports the following operations efficiently: - push(x): insert x onto the stack. - pop(): remov...

Coding & Algorithms
4
0
53 people solved
Jan 1, 2026
Crusoe logo
Crusoe
Medium
Software EngineerSenior+

Print a binary tree as aligned text

Implement a function that prints (or returns) an ASCII layout of a binary tree. Requirements: - Each node has a string value (assume it contains no sp...

Coding & Algorithms
13
0
165 people solved
Jan 1, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Find top-k lottery winners by spending

This question evaluates skills in selection and ordering of numeric-keyed records, covering concepts such as order statistics, deterministic tie-break...

Coding & Algorithms
7
0
63 people solved
Jan 1, 2026
Instacart logo
Instacart
Medium
Software Engineer Locked

Implement multiple coding round problems

This multi-part question evaluates algorithmic problem-solving skills including efficient lookup/search, stable ordering and priority management, stre...

Coding & Algorithms
19
0
191 people solved
Jan 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