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
Uber logo
Uber
Hard
Software Engineer

Maintain the First Value That Appears Exactly Once

Design a data structure that maintains a stream of integers and returns the first value that appears exactly once. Implement: `python class FirstUniqu...

Coding & Algorithms
0
0
1 people solved
Apr 17, 2026
Box logo
Box
Easy
Software Engineer

Implement a Leaky Bucket Rate Limiter

Implement a leaky bucket rate limiter. You are given a class template for a rate limiter that controls whether incoming requests should be accepted or...

Coding & Algorithms
1
0
5 people solved
Apr 17, 2026
Microsoft logo
Microsoft
Medium
Software Engineer

Retain Top K Elements

Given a list of integers nums and an integer k, return a new list formed from the original list after removing every element except the k largest elem...

Coding & Algorithms
1
0
12 people solved
Apr 17, 2026
Meta logo
Meta
Medium
Software Engineer

Solve Array, Matrix, and Recommendation Problems

During an onsite coding interview, solve the following independent tasks. Problem 1: In-place unique prefix You are given a nondecreasing integer arra...

Coding & Algorithms
0
0
16 people solved
Apr 17, 2026
Netflix logo
Netflix
Medium
Software Engineer

Implement TTL Cache and Tree Balance Reporting

Complete both coding tasks. Task A: Time-limited cache Design and implement an in-memory cache where every key expires after a time-to-live duration. ...

Coding & Algorithms
1
0
13 people solved
Apr 17, 2026
Uber logo
Uber
Medium
Machine Learning Engineer

Find First Local Minimum

Given an integer array nums, find the index of the first local minimum. A local minimum is an element that is smaller than its immediate neighbors: - ...

Coding & Algorithms
3
0
20 people solved
Apr 17, 2026
Anthropic logo
Anthropic
Hard
Software Engineer

Compute Exclusive Time from Stack Events

Compute Exclusive Time from Stack Events Given entry and exit events from one thread, compute the total exclusive running time of each function. The i...

Coding & Algorithms
0
0
11 people solved
Apr 16, 2026
Meta logo
Meta
Medium
Machine Learning Engineer AI

Find a String Containing Another

Given a list of strings, determine whether any string in the list contains another string from the same list as a contiguous substring. Return one str...

Coding & Algorithms
0
0
14 people solved
Apr 16, 2026
Collegevine logo
Collegevine
Medium
Software Engineer

Find the Highest-Cost Top-Level Job

You are given a local JSON file, jobs.json, containing an array of background job records. Each record has: - id: a unique job identifier - parent_id:...

Coding & Algorithms
1
0
13 people solved
Apr 16, 2026
Uber logo
Uber
Medium
Software EngineerSenior+

Find Any Available Meeting Room

You are given multiple meeting rooms. For each room, the existing bookings are represented as a list of non-overlapping time intervals sorted by start...

Coding & Algorithms
9
0
55 people solved
Apr 16, 2026
Glean logo
Glean
Hard
Software Engineer

Search Words in a Character Grid

You are given a 2D grid board of lowercase English letters with m rows and n columns. A word can be constructed from letters of sequentially adjacent ...

Coding & Algorithms
7
0
130 people solved
Apr 15, 2026
Amazon logo
Amazon
Hard
Software Engineer Locked

Find Longest Activatable Server Streak

This question evaluates array algorithm skills, specifically recognition of sliding-window or two-pointer techniques and reasoning about time and spac...

Coding & Algorithms
3
0
36 people solved
Apr 15, 2026
Bytedance logo
Bytedance
Medium
Software EngineerSenior+

Find Words in a Character Grid

Implement findWords(board, words) for a word-search game. You are given an m x n grid of lowercase English letters and a list of lowercase dictionary ...

Coding & Algorithms
0
0
6 people solved
Apr 14, 2026
Apple logo
Apple
Hard
Software Engineer

Find the Extra Edge

You are given an undirected graph that started as a tree with n nodes labeled from 1 to n. One additional edge was then added between two different ex...

Coding & Algorithms
13
0
88 people solved
Apr 14, 2026
Applied logo
Applied
Medium
Machine Learning Engineer

Implement a Fixed-Capacity Deque

Design and implement a fixed-capacity double-ended queue. The data structure is initialized with an integer capacity k and must support the following ...

Coding & Algorithms
3
0
27 people solved
Apr 14, 2026
PayPal logo
PayPal
Medium
Software Engineer

Minimize a String Using Allowed Swaps

You are given a string s of lowercase English letters and an array pairs, where each element pairs[i] = [a, b] means you may swap the characters at in...

Coding & Algorithms
4
0
33 people solved
Apr 14, 2026
eBay logo
eBay
Medium
Software EngineerSenior+

Assign Ads to Browser Positions

Implement a function that assigns ads to browser positions for a single user. You are given: - positions: a list of browser position identifiers, such...

Coding & Algorithms
0
0
15 people solved
Apr 13, 2026
Capital One logo
Capital One
Medium
Machine Learning Engineer

Solve Four Coding Assessment Tasks

Complete the following four independent coding tasks. 1. Find the day a cumulative visit target is reached You are given an array visits, where visits...

Coding & Algorithms
4
0
34 people solved
Apr 13, 2026
Waymo logo
Waymo
Medium
Software Engineer

Find Largest Adjacent Sorted Difference

Given an unsorted array of integers nums, compute the largest difference between two consecutive elements after the array is sorted in ascending order...

Coding & Algorithms
8
1
56 people solved
Apr 12, 2026
Uber logo
Uber
Medium
Software Engineer

Find a Bounded Subarray and Largest Square

Implement the following two independent coding tasks. Task A: Longest bounded-range subarray Given an integer array nums and an integer limit, return ...

Coding & Algorithms
1
0
14 people solved
Apr 12, 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