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 Locked

Merge Multiple Sorted Arrays

This question evaluates a candidate's competency in array manipulation, merging techniques, and algorithmic complexity analysis, including handling ed...

Coding & Algorithms
1
0
16 people solved
May 22, 2026
Apple logo
Apple
Easy
Software Engineer Locked

Find Common Prefix Across Strings

This question evaluates proficiency in string manipulation and array processing, focusing on identifying common prefixes, handling edge cases such as ...

Coding & Algorithms
5
0
25 people solved
May 22, 2026
Nimble logo
Nimble
Hard
Software Engineer Locked

Implement a TTL LRU Cache

This question evaluates understanding of in-memory cache design, including per-entry TTL expiration, LRU eviction, and the data structure and complexi...

Coding & Algorithms
0
0
7 people solved
May 21, 2026
Purestorage logo
Purestorage
Medium
Software Engineer Locked

Count All-One Square Submatrices

This question evaluates dynamic programming, matrix traversal, and algorithmic optimization skills for identifying and counting structured patterns in...

Coding & Algorithms
0
0
6 people solved
May 21, 2026
Beaconfire logo
Beaconfire
Easy
Machine Learning Engineer Locked

Check Whether a String Is Built by Repetition

This question evaluates string manipulation and pattern recognition skills, focusing on detection of repeated substring patterns, string periodicity, ...

Coding & Algorithms
1
0
9 people solved
May 21, 2026
Cisco logo
Cisco
Hard
Software Engineer Locked

Implement an LFU Cache

This question evaluates understanding of algorithmic design and data structure management for cache eviction policies, focusing on frequency- and rece...

Coding & Algorithms
1
0
5 people solved
May 21, 2026
Guidewire logo
Guidewire
Medium
Software Engineer Locked

Minimize Boys Needed Beside Girls

This question evaluates string and array manipulation skills, the ability to model adjacency-based constraints, and optimization reasoning for minimiz...

Coding & Algorithms
0
0
9 people solved
May 21, 2026
Microsoft logo
Microsoft
Medium
Software Engineer

Maximize a Product After a Shared XOR

Maximize a Product After a Shared XOR Given positive integers a and b and a bit width n, choose an integer x with 0 <= x < 2**n that maximizes: `text ...

Coding & Algorithms
1
0
11 people solved
May 20, 2026
Visa logo
Visa
Hard
Software EngineerSenior+ Locked

Count Subsequences That Move Between Positions

Practice a Visa coding interview problem focused on count subsequences that move between positions. The prompt emphasizes edge cases, clean implementa...

Coding & Algorithms
0
0
2 people solved
May 20, 2026
Bytedance logo
Bytedance
Medium
Data Engineer Locked

Connect Points With Minimum Total Distance

This question evaluates a candidate's competency in graph modeling, geometric distance metrics, and algorithmic complexity analysis for optimizing tot...

Coding & Algorithms
2
0
19 people solved
May 19, 2026
Xiaohongshu logo
Xiaohongshu
Medium
Software Engineer Locked

Find the Unique Element in Pairs

This question evaluates a candidate's ability to design time- and space-efficient algorithms for sorted array problems, focusing on identifying a sing...

Coding & Algorithms
0
0
5 people solved
May 18, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer Locked

Determine Balloon Popping Time

This question evaluates understanding of grid-to-graph modeling, reachability and propagation dynamics, and handling heterogeneous spread times within...

Coding & Algorithms
0
0
8 people solved
May 18, 2026
Hudson logo
Hudson
Medium
Software Engineer

Return the K Smallest Integers

Return the K Smallest Integers Given an unsorted list of integers and an integer k, return the k smallest values in ascending order. Preserve duplicat...

Coding & Algorithms
1
0
9 people solved
May 15, 2026
Hudson logo
Hudson
Medium
Software Engineer

Determine Whether Two Integers Sum to a Target

Determine Whether Two Integers Sum to a Target Given a list of integers and a target integer, return whether two elements at distinct indices add up t...

Coding & Algorithms
1
0
11 people solved
May 15, 2026
Okta logo
Okta
Medium
Frontend EngineerSenior+ Locked

Deduplicate an Array in Linear Time

This question evaluates a candidate's ability to implement linear-time deduplication of primitive arrays, understand hash-based membership tracking, a...

Coding & Algorithms
0
0
9 people solved
May 15, 2026
Uber logo
Uber
Easy
Software Engineer Locked

Find Earliest Column With One

This question evaluates algorithmic problem-solving and optimization skills for working with a row-wise sorted binary matrix accessed via an API, focu...

Coding & Algorithms
1
0
16 people solved
May 15, 2026
Pinterest logo
Pinterest
Medium
Software Engineer Locked

Solve Multiple Coding Interview Problems

This multi-part question evaluates skills in graph traversal and shortest-path reasoning (minimum transit routes), precise string and numeric manipula...

Coding & Algorithms
3
0
25 people solved
May 15, 2026
Meta logo
Meta
Medium
Software Engineer AI Locked

Solve a Key-Door Corridor Maze

This question evaluates graph search and state-space reasoning by requiring shortest-path computation in a constrained one-dimensional maze with colle...

Coding & Algorithms
2
0
33 people solved
May 14, 2026
Hive.Ai logo
Hive.Ai
Hard
Software EngineerSenior+

Detect a Reachable Negative Cycle

Detect a Reachable Negative Cycle Given a directed weighted graph, determine whether a negative-weight cycle is reachable from a specified start verte...

Coding & Algorithms
0
0
8 people solved
May 13, 2026
Hive.Ai logo
Hive.Ai
Hard
Software EngineerSenior+

Track the Median of a Stream

Track the Median of a Stream Design a data structure that accepts integers one at a time and returns the median of all values seen so far. The capture...

Coding & Algorithms
0
0
5 people solved
May 13, 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