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

Solve three algorithmic OA tasks

Solve three algorithmic OA tasks Task 1 (Odd-frequency string): Given an integer N in [1..200000], write an algorithm that returns any length-N string...

Coding & Algorithms
11
0
127 people solved
Jul 31, 2025
Rogo logo
Rogo
Medium
Machine Learning Engineer

Infer the Smallest Valid Character Order from Sorted Password Hints

Infer the Smallest Valid Character Order from Sorted Password Hints You are given password hints already sorted according to an unknown alphabet. Infe...

Coding & Algorithms
0
0
2 people solved
Jun 24, 2026
Whatnot logo
Whatnot
Medium
Software Engineer Locked

Content Safety Filter

This coding question tests string parsing, tokenization logic, and pattern-matching algorithm design in a practical content moderation context. It eva...

Coding & Algorithms
1
0
12 people solved
Jun 24, 2026
Apple logo
Apple
Medium
Software EngineerNew Grad

Solve interval, grid-fill, and heap tasks

You are asked to solve the following algorithmic problems. Problem 1: Concurrent users from online intervals You are given n inclusive time intervals ...

Coding & Algorithms
15
0
192 people solved
Nov 27, 2025
Atlassian logo
Atlassian
Hard
Machine Learning Engineer Locked

Find a secret word using match feedback

This question evaluates algorithmic problem-solving, combinatorial reasoning, and information-theoretic search strategies for narrowing a secret from ...

Coding & Algorithms
6
0
84 people solved
Mar 1, 2026
Ramp logo
Ramp
Medium
Software Engineer

Build a Wordle-style game in React

Task Implement a simplified Wordle-style game as a small React app. No styling/CSS is required (plain HTML output is fine). Game rules (assume Wordle-...

Coding & Algorithms
14
0
140 people solved
Mar 1, 2026
Google logo
Google
Medium
Software Engineer

Find fair split of a two-color necklace

Given a circular necklace represented by a string s over {'a','b'}, you may cut the necklace at most twice (yielding three contiguous pieces). Can you...

Coding & Algorithms
12
0
153 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer Locked

Account Balance with Expiring Grants

This question evaluates the ability to design a data structure that tracks time-limited credit grants, prioritizing expiration order during spending a...

Coding & Algorithms
0
0
13 people solved
Jun 23, 2026
Anthropic logo
Anthropic
Medium
Software Engineer Locked

In-Memory Key-Value Database with Nested Transactions

This question evaluates a candidate's ability to design a data structure that layers transactional state over a committed base, testing skills in nest...

Coding & Algorithms
5
0
22 people solved
Jun 23, 2026
Databricks logo
Databricks
Medium
Software Engineer Locked

Design an n x n Tic-Tac-Toe Game

This question evaluates a candidate's ability to design a class-based data structure that tracks game state and efficiently detects a win condition af...

Coding & Algorithms
4
0
30 people solved
Jun 23, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Deep Equality of Two Records

This coding question tests a software engineer's ability to implement recursive structural comparison across nested, heterogeneous data types. It eval...

Coding & Algorithms
1
0
12 people solved
Jun 23, 2026
Microsoft logo
Microsoft
Easy
Data ScientistNew Grad

Compute and plot a precision–recall curve

You are given model outputs for a binary classifier: - y_true: an array of 0/1 ground-truth labels of length n. - y_score: an array of predicted score...

Coding & Algorithms
6
0
66 people solved
Nov 24, 2025
Coinbase logo
Coinbase
Medium
Machine Learning Engineer

Write SQL to rank top products per category

You are given two tables: products - product_id (int, primary key) - category (string) order_items - order_id (int) - product_id (int) - quantity (int...

Coding & Algorithms
10
1
116 people solved
Dec 4, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Solve linked list, tree, and grid problems

Problem A — Find cycle entry in a singly linked list You are given the head of a singly linked list. The list may contain a cycle. - Return the node w...

Coding & Algorithms
15
0
107 people solved
Dec 15, 2025
Airbnb logo
Airbnb
Medium
Machine Learning Engineer Locked

Minimum Canisters to Top Up an Exact Target

This question evaluates a candidate's grasp of dynamic programming, specifically the unbounded knapsack (coin change) pattern for finding the minimum ...

Coding & Algorithms
1
0
14 people solved
Jun 22, 2026
Google logo
Google
Easy
Software Engineer Locked

Deterministic Task Execution Order

This question evaluates a candidate's ability to model task dependencies as a directed graph and produce a valid execution order, a core graph algorit...

Coding & Algorithms
2
1
11 people solved
Jun 22, 2026
Snapchat logo
Snapchat
Hard
Software Engineer Locked

Implement a search autocomplete suggestion service

This question evaluates proficiency in designing efficient prefix-matching and ranking mechanisms, including management of incremental query state and...

Coding & Algorithms
10
0
85 people solved
Feb 11, 2026
Stripe logo
Stripe
Medium
Software Engineer

Calculate Transaction Fees

You are building a payment processor. Each transaction has an amount in cents, a payment type, and a payment status. The platform charges a percentage...

Coding & Algorithms
4
1
81 people solved
Apr 9, 2026
Stripe logo
Stripe
Hard
Data Engineer

Compute transaction fees from a CSV string

You are given a CSV string representing a list of payment transactions. Write a function that parses the CSV and returns a CSV string with the total p...

Coding & Algorithms
12
0
231 people solved
Feb 24, 2026
Microsoft logo
Microsoft
Medium
Software Engineer

Identify the Extra Directed Edge

You are given a list of directed edges edges, where each edge is represented as [parent, child]. The graph contains nodes labeled from 1 to n, and it ...

Coding & Algorithms
4
0
58 people solved
Jan 3, 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