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
Zillow logo
Zillow
Medium
Machine Learning Engineer

Find max min-plus-max over all subarrays

Find max min-plus-max over all subarrays You are given an array arr of n integers. A subarray is a contiguous non-empty segment of the array. For any ...

Coding & Algorithms
5
0
37 people solved
Jul 18, 2025
Applied Intuition logo
Applied Intuition
Medium
Software Engineer

Design event timeout detector

Design and implement an event-timeout detector for a job scheduler. Inputs: a global timeout T and a stream of events; each event has {event_id, type ...

Coding & Algorithms
8
0
115 people solved
Jul 17, 2025
xAI logo
xAI
Medium
Machine Learning EngineerIntern

Validate normalized palindromes with variants

Implement a function isNormalizedPalindrome(s) that returns true if s reads the same forward and backward after removing non‑alphanumeric characters a...

Coding & Algorithms
14
1
109 people solved
Jul 17, 2025
Circle logo
Circle
Medium
Software Engineer

Implement a simplified multi-level banking system

Implement a simplified multi-level banking system Implement a simplified banking system with multi-level requirements. All operations accept a stringi...

Coding & Algorithms
9
0
83 people solved
Jul 17, 2025
Optiver logo
Optiver
Medium
Software Engineer

Solve three mini-game algorithm tasks

Solve three mini-game algorithm tasks Solve three mini-game algorithm tasks: (a) Move-House Puzzle: Given initial and target arrangements of N labeled...

Coding & Algorithms
12
0
86 people solved
Jul 17, 2025
DoorDash logo
DoorDash
Medium
Software Engineer

Compute nearest dashmart and busiest assignments

Compute nearest dashmart and busiest assignments You are given an m x n grid of characters where 'D' marks a dashmart, 'X' marks an impassable cell, a...

Coding & Algorithms
7
0
75 people solved
Jul 17, 2025
Meta logo
Meta
Medium
Software Engineer

Implement string sum and weighted city picker

Implement string sum and weighted city picker Part A — Add two numbers represented as strings: Given two non‑negative integers provided as decimal str...

Coding & Algorithms
3
0
36 people solved
Jul 17, 2025
IXL Learning logo
IXL Learning
Medium
Software Engineer

Identify and prevent code-breaking inputs

Identify and prevent code-breaking inputs Identify inputs and scenarios that could break your implementation and explain how you would prevent them. C...

Coding & Algorithms
5
0
56 people solved
Jul 17, 2025
IXL Learning logo
IXL Learning
Medium
Software Engineer

Solve snake game, peak search, and task scheduling

Solve snake game, peak search, and task scheduling 1) Design a grid-based snake simulation that supports move(direction) operations on a W×H board. Th...

Coding & Algorithms
4
0
73 people solved
Jul 17, 2025
TikTok logo
TikTok
Medium
Software Engineer

Explain Java DI, AOP, and transactions

Explain how dependency injection and AOP proxies are implemented in a modern Java framework such as Spring: bean lifecycle (creation, post-processing,...

Coding & Algorithms
2
0
18 people solved
Jul 17, 2025
TikTok logo
TikTok
Medium
Software Engineer

Parse chemical formula with multipliers

Parse chemical formula with multipliers Given a string representing a chemical formula, parse it and return the total count of each element. The formu...

Coding & Algorithms
3
0
34 people solved
Jul 16, 2025
Meta logo
Meta
Medium
Data Engineer

Solve library coding tasks in Python

Solve library coding tasks in Python Implement the following Python tasks: 1) Given a list of (category, points) for books, choose up to 3 books with ...

Coding & Algorithms
12
0
86 people solved
Jul 16, 2025
Veeva Systems logo
Veeva Systems
Medium
Software Engineer

Compute build order from dependencies

Compute build order from dependencies You are given a directed graph represented as a mapping where each key X maps to a list of tasks that depend on ...

Coding & Algorithms
2
0
41 people solved
Jul 16, 2025
Optiver logo
Optiver
Medium
Software Engineer

Detect currency arbitrage with costs

You are given a K×K matrix R of currency exchange rates where R[i][j] is the amount of currency j obtainable for one unit of currency i, and R[i][i] =...

Coding & Algorithms
36
0
261 people solved
Jul 16, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Design refundable transaction ledger and prioritization rules

Design and implement a transaction ledger that ingests a stream of records where each record is either a payment or a refund. Each payment has {id, us...

Coding & Algorithms
32
0
298 people solved
Jul 16, 2025
Samsara logo
Samsara
Medium
Software Engineer

Implement Markdown-to-HTML parser

Implement a function that converts a plain-text string into HTML supporting only these features: ( 1) Paragraphs: two or more consecutive newline char...

Coding & Algorithms
16
0
189 people solved
Jul 16, 2025
Morgan Stanley logo
Morgan Stanley
Medium
Software Engineer

Count decodings of a digit string

Count decodings of a digit string You are given a non-empty digit string s consisting of characters '0'–'9' and a mapping where 1->'a', 2->'b', ..., 2...

Coding & Algorithms
3
0
37 people solved
Jul 16, 2025
J.P. Morgan logo
J.P. Morgan
Medium
Software Engineer

Group anagrams and count string in grid

Part 1 — Group Anagrams: Given an array of strings, group together strings that are anagrams of one another and output both the grouped lists and the ...

Coding & Algorithms
4
0
35 people solved
Jul 16, 2025
Meta logo
Meta
Medium
Software Engineer

Implement range-sum tree and sort merged lists

Implement range-sum tree and sort merged lists 1) Given a binary tree whose nodes store integer values, and two integers low and high defining an incl...

Coding & Algorithms
4
0
38 people solved
Jul 16, 2025
Apple logo
Apple
Medium
Data Scientist

Implement sparse vector dot product and cosine similarity

Sparse Vector Class Implement a SparseVector class for high-dimensional vectors where most entries are zero. Representation Assume each vector has: - ...

Coding & Algorithms
6
0
56 people solved
Jul 15, 2025

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