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

Compute shared free time intervals

You are given schedules for multiple employees. schedules[i] is a list of busy intervals for employee i, where each interval is half-open [start, end)...

Coding & Algorithms
5
0
56 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Remove minimum parentheses to balance string

Given a string s containing lowercase letters and the characters '(' and ')', remove the minimum number of parentheses so that the resulting string is...

Coding & Algorithms
1
0
37 people solved
Sep 6, 2025
Harvey logo
Harvey
Medium
Software Engineer

Design an in-memory file system with limits

Design and implement an in-memory hierarchical file system. Requirements: 1) addFile(String path): Given an absolute path like "path/to/somewhere/file...

Coding & Algorithms
48
0
475 people solved
Sep 6, 2025
Amazon logo
Amazon
Medium
Software Engineer

Determine string buildability from dictionary

Given a non-empty string s and a list of non-empty words dict, determine whether s can be formed by concatenating words from dict with unlimited reuse...

Coding & Algorithms
3
0
42 people solved
Sep 6, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Find max-score path in weighted DAG

You are given a directed acyclic graph (DAG). Each node v has a score w(v). Each directed edge (u→v) has a nonnegative time cost t(u,v). There is a un...

Coding & Algorithms
30
1
279 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Find >n/3 elements in sorted array

Question Given a sorted (non-decreasing) integer array A of length n, return all distinct values that occur strictly more than n/3 times. Design an al...

Coding & Algorithms
4
0
32 people solved
Sep 6, 2025
Fanatics logo
Fanatics
Medium
Software Engineer

Plot ASCII chart for time-price pairs

Given an unsorted array of (timestamp, price) integer pairs, write a function to render an ASCII chart of the time series. The x-axis must include eve...

Coding & Algorithms
21
0
281 people solved
Sep 6, 2025
Plaid logo
Plaid
Medium
Software Engineer

Design a coupon redemption system

Implement an in-memory coupon service supporting: addCoupon(code, discount, expiresAt, totalLimit, perUserLimit); redeem(userId, code, now) -> success...

Coding & Algorithms
27
0
511 people solved
Sep 6, 2025
Applied Intuition logo
Applied Intuition
Medium
Software Engineer

Find grid cell minimizing sum distances

You are given an m x n 2D grid with k marked points. Movement is allowed in four directions (up, down, left, right) with unit cost per step. Find a gr...

Coding & Algorithms
31
0
217 people solved
Sep 6, 2025
Uber logo
Uber
Medium
Machine Learning Engineer

Count connected delivery zones

Given an m x n grid representing a service area, each cell is either 'Z' (deliverable zone) or '#' (blocked). Two 'Z' cells belong to the same zone if...

Coding & Algorithms
5
0
85 people solved
Sep 6, 2025
Pinterest logo
Pinterest
Medium
Software Engineer

Determine equality of arbitrarily nested sets

Implement a function that determines whether two arbitrarily nested sets are equal. Sets are unordered and contain no duplicates; elements can be inte...

Coding & Algorithms
15
0
139 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Detect cycles and order with DFS

You are given a directed graph of package dependencies represented as an adjacency list: Map<String, List<String>> deps where deps[p] lists packages t...

Coding & Algorithms
5
0
61 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Implement merge-in-place and group cyclic-equivalent strings

You are given two ascending arrays to merge in place and a separate grouping task: Part A — In-place merge without known sizes: - Array A contains sor...

Coding & Algorithms
5
0
48 people solved
Sep 6, 2025
Applied Intuition logo
Applied Intuition
Medium
Software Engineer

Design a nested transaction store

Implement an in-memory key–value store that supports nested transactions with the operations: SET key value, RETURN key, BEGIN, APPLY (commit current ...

Coding & Algorithms
31
0
220 people solved
Sep 6, 2025
Voleon Group logo
Voleon Group
Medium
Software Engineer

Design circular sliding-window ratio tracker

You are given a circular binary array A of length n (A[i] ∈ {0,1}) and a fixed window size w (1 ≤ w ≤ n). Define r (i) as the fraction of 1s within th...

Coding & Algorithms
19
0
257 people solved
Sep 6, 2025
Stripe logo
Stripe
Medium
Software Engineer

Implement multi-part cost calculator

You are given a price catalog and a list of orders. Implement the following in any language (Python examples acceptable): Inputs - price_catalog: mapp...

Coding & Algorithms
5
0
41 people solved
Sep 6, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Generate split-stay pairs efficiently

Given N Airbnb listings, each with available days as integers, and an inclusive requested date range [L, R], return all ordered pairs (X, Y) of distin...

Coding & Algorithms
22
0
222 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Machine Learning Engineer Locked

Find longest palindromic substring

This question evaluates knowledge of string algorithms and pattern recognition, focusing on identifying palindromic substrings and reasoning about tim...

Coding & Algorithms
6
0
67 people solved
Nov 28, 2025
Netflix logo
Netflix
Hard
Data Engineer Locked

Implement a Weighted Eviction Cache

This question evaluates proficiency with data structures and algorithmic design for resource-constrained caching, specifically weight-aware eviction p...

Coding & Algorithms
4
0
43 people solved
Nov 27, 2025
Ramp logo
Ramp
Medium
Software Engineer

Maximum Profit from Dated Stock Trade Records

Maximum Profit from Dated Stock Trade Records You are given a log of stock trades. Each trade is a record [date, symbol, price]: - date — a calendar d...

Coding & Algorithms
0
0
10 people solved
Mar 9, 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