Coding & Algorithms Interview Questions

Practice 3,429 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.4k Questions 368 Companies08.11.2026
Showing 20 results
Role
Bytedance logo
Bytedance
Medium
Software Engineer Locked

Elements Occurring More Than n/3 Times in a Sorted Array

This question evaluates a candidate's ability to design frequency-counting algorithms over sorted arrays, testing knowledge of majority-element patter...

Coding & Algorithms
1
0
12 people solved
Jun 24, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer

Find invalid transactions in time-sorted input

Problem You are given a list of transaction records, already sorted in non-decreasing order by time. Each transaction is a string in the form: "name,t...

Coding & Algorithms
37
0
270 people solved
Dec 15, 2025
Two Sigma logo
Two Sigma
Easy
Data Scientist

Match readings with latest same-city humidity

Problem You are given two time-sorted lists of sensor readings: - Temperature records: (time, city, reading) - Humidity records: (time, city, reading)...

Coding & Algorithms
14
1
164 people solved
Dec 15, 2025
Citadel logo
Citadel
Medium
Software Engineer Locked

Top-K Largest Elements in Every Sliding Window

This question evaluates the ability to design and maintain an ordered data structure that efficiently tracks the top K largest values within a moving ...

Coding & Algorithms
1
0
17 people solved
Jun 22, 2026
Citadel logo
Citadel
Medium
Software Engineer Locked

Find the Index Range of a Target in a Sorted Array

This question evaluates a candidate's grasp of binary search and its adaptation to locate boundary positions within a sorted array. It tests the abili...

Coding & Algorithms
1
0
15 people solved
Jun 22, 2026
Pinterest logo
Pinterest
Medium
Software Engineer

Reconstruct itinerary with lexicographic ties

You are given m airline tickets as directed pairs [from, to]. Build an itinerary that starts at a specified airport start (e.g., "JFK") and uses every...

Coding & Algorithms
23
0
230 people solved
Sep 6, 2025
6Sense logo
6Sense
Medium
Software Engineer

Count Squares from Points in the Plane

Implement count_squares(points). Given distinct 2D points with integer coordinates, count the unique squares whose four corners all occur in the input...

Coding & Algorithms
0
0
1 people solved
Jul 27, 2026
Pinterest logo
Pinterest
Hard
Machine Learning Engineer

Implement a Stateful Search Autocomplete Session

Implement a Stateful Search Autocomplete Session Build an autocomplete engine from historical sentences and their usage counts. While a user types a s...

Coding & Algorithms
2
0
34 people solved
Jul 3, 2026
MathWorks logo
MathWorks
Medium
Software EngineerNew Grad

Determine Whether P's Position Is Unique

You are given an R x C rectangular grid and a set of named entities. Each entity must be placed in exactly one distinct cell. You are also given a col...

Coding & Algorithms
5
0
72 people solved
Jan 22, 2026
Expedia logo
Expedia
Medium
Software Engineer

Find a Canonical Shortest Round Trip Through Flights

Find a Canonical Shortest Round Trip Through Flights Problem Implement shortestRoundTrip(flights, start) -> route. Each element of flights is a direct...

Coding & Algorithms
0
0
2 people solved
Jul 16, 2026
Shopify logo
Shopify
Medium
Software Engineer AI Locked

Grid Robot Command Simulator

This question tests practical coding ability by requiring implementation of a command-driven state machine on a bounded 2D grid. It evaluates simulati...

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

Least Frequently Used (LFU) Cache

This question tests practical data structure design by requiring an O(1) implementation of a Least Frequently Used cache with tie-breaking by recency....

Coding & Algorithms
1
0
13 people solved
Jun 20, 2026
Pinterest logo
Pinterest
Medium
Software Engineer

Mark and Compact a Heap-Indexed Subtree

Mark and Compact a Heap-Indexed Subtree An interview report describes an array-encoded tree, marking a target and its descendants with -1, then moving...

Coding & Algorithms
1
0
22 people solved
Jul 2, 2026
StubHub logo
StubHub
Medium
Software Engineer Locked

Design Composable Event Recommendations

This question evaluates a candidate's ability to design composable, extensible recommendation logic and ranking for a ticket marketplace, emphasizing ...

Coding & Algorithms
9
0
81 people solved
Mar 29, 2026
NVIDIA logo
NVIDIA
Easy
Software Engineer Locked

Compute the Final Robot Score

This question evaluates data structure and algorithm proficiency, focusing on managing dynamic multisets with priority-based selection and reasoning a...

Coding & Algorithms
5
0
42 people solved
May 19, 2026
Anthropic logo
Anthropic
Medium
Software Engineer

Implement a crash-resilient LRU cache

Implement an LRU-based memoization helper with behavior similar to a standard Python LRU cache. You are given an interface like this: `python class LR...

Coding & Algorithms
721
4
5127 people solved
Mar 13, 2026
NVIDIA logo
NVIDIA
Hard
Data Scientist

Optimize CUDA GEMM with tiling and coalescing

CUDA Execution Model, Memory Hierarchy, and GEMM Kernel Design You are interviewing for a Data Scientist / GPU-software role at NVIDIA. The interviewe...

Coding & Algorithms
14
0
259 people solved
Oct 13, 2025
Oracle logo
Oracle
Medium
Software Engineer

Count Requests Dropped by Multiple Time Windows

Count Requests Dropped by Multiple Time Windows Implement count_dropped(timestamps) for nondecreasing integer seconds. For zero-based request index i,...

Coding & Algorithms
0
0
1 people solved
Jul 26, 2026
Oracle logo
Oracle
Medium
Software Engineer

Keep At Most K Copies in a Sorted Array

Keep At Most K Copies in a Sorted Array Implement dedupe_sorted(nums, k). Modify the sorted input array in place so each distinct integer appears at m...

Coding & Algorithms
0
0
1 people solved
Jul 26, 2026
Oracle logo
Oracle
Medium
Software Engineer

Compress Consecutive Characters with Run Lengths

Compress Consecutive Characters with Run Lengths Implement compress_runs(s) and return the compressed string. The input contains ASCII letters only. S...

Coding & Algorithms
0
0
1 people solved
Jul 26, 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