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
Upstart logo
Upstart
Easy
Software Engineer

Report Where a Value Appears

Report Where a Value Appears Given a target and an even-length integer list, return four binary flags describing whether the target occurs: 1. at an e...

Coding & Algorithms
0
0
9 people solved
Jul 5, 2026
Upstart logo
Upstart
Easy
Software Engineer

Remove Duplicate Integers While Preserving Order

Remove Duplicate Integers While Preserving Order Return the distinct integers from an input list in the order of their first appearance. Function Sign...

Coding & Algorithms
1
0
8 people solved
Jul 5, 2026
Upstart logo
Upstart
Easy
Software Engineer

Compute a Point Set's Bounding Rectangle

Compute a Point Set's Bounding Rectangle Given two-dimensional integer points, return the smallest axis-aligned rectangle containing every point. Repr...

Coding & Algorithms
1
0
14 people solved
Jul 5, 2026
Amazon logo
Amazon
Hard
Software Engineer

Find Two-Word Compound Words

Given a list of unique lowercase words, return every word that can be formed by concatenating exactly two other words from the same list. For each com...

Coding & Algorithms
1
0
18 people solved
Jul 5, 2026
Amazon logo
Amazon
Easy
Software Engineer

Implement Regular Expression Matching

Implement Regular Expression Matching Determine whether an entire input string matches a pattern containing lowercase letters and two special symbols:...

Coding & Algorithms
1
0
16 people solved
Jul 4, 2026
Amazon logo
Amazon
Easy
Software Engineer

Unify Stock-Trading Profit Variants

Unify Stock-Trading Profit Variants Given daily stock prices, return the maximum profit when you may complete at most max_transactions buy-then-sell t...

Coding & Algorithms
1
0
13 people solved
Jul 4, 2026
Snowflake logo
Snowflake
Medium
Software Engineer

Find the Nearest Target Character and Support Streaming Updates

Given an array of characters and a target character, return the distance from each index to the nearest target occurrence, or -1 if the target never a...

Coding & Algorithms
0
0
11 people solved
Jul 4, 2026
SoFi logo
SoFi
Easy
Software EngineerSenior+

Return All Nodes Reachable from a Starting Vertex

Given directed edges and a starting vertex, return all vertices reachable from the start, including the start. The graph may contain cycles. Implement...

Coding & Algorithms
0
0
13 people solved
Jul 3, 2026
Hudson River Trading logo
Hudson River Trading
Medium
Software Engineer

Simulate Alternating Stick Collection for a Nest

A bird is building a nest in a forest represented by an array forest. Positive integers are sticks, where the integer value is the stick length. Zeroe...

Coding & Algorithms
0
0
6 people solved
Jul 2, 2026
Hudson River Trading logo
Hudson River Trading
Medium
Software Engineer

Count Length-3 Chat Substrings with a Vowel

You are developing an automatic moderation system for a chat application that detects simple linguistic patterns. Given a string chatMessage, count ho...

Coding & Algorithms
0
1
4 people solved
Jul 2, 2026
Salesforce logo
Salesforce
Medium
Software Engineer

Count the Ways to Split a Digit String into Primes

You are given a string s consisting of decimal digits ('0'–'9') that represents a positive integer. Count the number of ways to split s into a sequenc...

Coding & Algorithms
0
0
6 people solved
Jun 30, 2026
Salesforce logo
Salesforce
Medium
Software Engineer

Find a Valid Task Execution Order with Dependencies

You are building the task scheduler for a CI/build system. There are n build tasks labeled from 0 to n - 1. Some tasks cannot start until certain othe...

Coding & Algorithms
0
0
7 people solved
Jun 30, 2026
Intuit logo
Intuit
Medium
Software EngineerSenior+

Increment a Digit-Array Integer by One

Increment a Digit-Array Integer by One You are given a non-empty array digits in which each element is a single decimal digit (0-9). The array represe...

Coding & Algorithms
0
0
2 people solved
Jun 30, 2026
Tesla logo
Tesla
Easy
Software Engineer

Count the Ways to Decode a Numeric Cipher

A substitution cipher maps each uppercase English letter to a number: 'A' → 1, 'B' → 2, …, 'Z' → 26. To encode a word, every letter is replaced by its...

Coding & Algorithms
0
0
6 people solved
Jun 29, 2026
Flexport logo
Flexport
Hard
Software Engineer

Identify a Target Word with Repeated Minimax Guesses

Identify a Target Word with Repeated Minimax Guesses A hidden target is guaranteed to be one of the supplied words. You may repeatedly submit any word...

Coding & Algorithms
0
0
3 people solved
Jun 28, 2026
Uber logo
Uber
Medium
Software EngineerSenior+

Thread-Safe Token-Bucket Rate Limiter

Thread-Safe Token-Bucket Rate Limiter Design and implement a thread-safe rate limiter using the token bucket algorithm. The limiter is shared by many ...

Coding & Algorithms
0
0
6 people solved
Jun 28, 2026
Uber logo
Uber
Medium
Software EngineerSenior+

Group Anagrams

Group Anagrams Given an array of strings words, group together all strings that are anagrams of one another and return the groups. Two strings are ana...

Coding & Algorithms
1
0
10 people solved
Jun 28, 2026
Lyft logo
Lyft
Medium
Software Engineer

Smallest Covering Window in a String

Smallest Covering Window in a String You are given two strings, source and target. Return the shortest contiguous substring of source that contains ev...

Coding & Algorithms
0
0
8 people solved
Jun 28, 2026
Uber logo
Uber
Easy
Software EngineerNew Grad Locked

Sort a String of Clothing Sizes

Sort a string containing only S, M, and L into size order in linear time. Extend the discussion to custom token orderings, unknown-size behavior, empt...

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

Same-Domain Web Crawl (BFS)

This question evaluates a candidate's ability to implement graph traversal using breadth-first search while applying a domain-matching filter and dedu...

Coding & Algorithms
0
0
7 people solved
Jun 23, 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