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
SoFi logo
SoFi
Medium
Software EngineerSenior+ Locked

Generate all permutations of an array

This question evaluates understanding of permutation generation, recursion and backtracking techniques, along with skills in state-space exploration a...

Coding & Algorithms
11
0
105 people solved
Jan 16, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Implement cd and merge intervals

This question evaluates proficiency in filesystem path normalization (string parsing, tokenization, and edge-case handling) and interval-merging algor...

Coding & Algorithms
3
0
57 people solved
Jan 16, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer Locked

Add Two Forward-Order Lists

This question evaluates linked list manipulation and numerical addition represented in forward-order digit encoding, testing competency in handling di...

Coding & Algorithms
2
0
52 people solved
Jan 15, 2026
Uber logo
Uber
Medium
Software Engineer

Count paths with prime-ending jumps

You are given an integer n representing the top of a staircase, where you start at step 0 and want to land exactly on step n. In one move, you may jum...

Coding & Algorithms
2
0
35 people solved
Jan 15, 2026
Stripe logo
Stripe
Hard
Software Engineer

Detect Trigger and Resolve Events

You are given transaction logs sorted by non-decreasing timestamp. Each log record has four fields: - timestamp: integer time in seconds - merchant_id...

Coding & Algorithms
4
0
55 people solved
Jan 15, 2026
Amazon logo
Amazon
Hard
Software EngineerIntern

Count unique Morse-code word transformations

Given an array of lowercase strings words. Each letter 'a' to 'z' has a corresponding Morse code string (standard 26-letter mapping). A word’s transfo...

Coding & Algorithms
6
0
71 people solved
Jan 15, 2026
Google logo
Google
Hard
Software Engineer Locked

Find best-matching binary pattern with wildcards

This question evaluates pattern-matching and string-algorithm skills, including handling wildcards and variable-length matches, priority-based rule se...

Coding & Algorithms
10
0
114 people solved
Jan 15, 2026
Uber logo
Uber
Medium
Data Scientist

Convert a PDF to a CDF

Given a continuous random variable X with probability density function f(x), write code or describe an algorithm to construct its cumulative distribut...

Coding & Algorithms
10
0
77 people solved
Jan 14, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Select the best dasher for an order

You need to assign an order to a dasher. Input: - An order with a pickup location (x, y). - A list of dashers, each with: - id - current location ...

Coding & Algorithms
29
0
226 people solved
Jan 14, 2026
Sealth logo
Sealth
Medium
Software Engineer

Decode Ambiguous Morse Messages

You are given a mapping from Morse patterns to lowercase English letters. Implement two related functions: 1. Deterministic decoding with character an...

Coding & Algorithms
1
0
22 people solved
Jan 13, 2026
J.P. Morgan logo
J.P. Morgan
Easy
Software Engineer

Count substrings and generate TOC

Solve the following two coding problems. 1. Count valid binary substrings Given a string s consisting only of '0' and '1', count how many substrings s...

Coding & Algorithms
3
0
29 people solved
Jan 13, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Can two names match with ≤2 swaps?

You are given two restaurant names represented as strings s and t of equal length (same character set, case-sensitive). In one operation, you may swap...

Coding & Algorithms
5
0
94 people solved
Jan 13, 2026
Optiver logo
Optiver
Medium
Software Engineer Locked

Design a circular queue data structure

This question evaluates understanding of circular buffer data structures and the ability to implement fixed-capacity queue operations with O(1) time a...

Coding & Algorithms
8
0
69 people solved
Jan 13, 2026
LinkedIn logo
LinkedIn
Medium
Software Engineer Locked

Find dictionary words matching a phone digit string

This question evaluates familiarity with phone-keypad character-to-digit mappings, string pattern matching, and efficient filtering of dictionary word...

Coding & Algorithms
11
1
109 people solved
Jan 12, 2026
Art Advisors logo
Art Advisors
Medium
Software Engineer Locked

Solve common array/graph interview problems

This multi-part question evaluates proficiency in array and matrix manipulation, graph traversal and shortest-path reasoning for word transformations,...

Coding & Algorithms
1
0
23 people solved
Jan 12, 2026
Pinterest logo
Pinterest
Medium
Data Scientist Locked

Implement Jackknife and Random Choice

This question evaluates understanding of statistical resampling (jackknife), probabilistic sampling algorithms including with- and without-replacement...

Coding & Algorithms
8
0
91 people solved
Jan 11, 2026
Snowflake logo
Snowflake
Medium
Frontend Engineer Locked

Implement an event emitter

This question evaluates understanding of event-driven programming and API design in a frontend environment, specifically the ability to manage event l...

Coding & Algorithms
4
0
84 people solved
Jan 11, 2026
Google logo
Google
Medium
Software Engineer

Find top/bottom-k words in list or stream

You are given words (strings) either as a finite list or as an unbounded stream. 1) List version: Given an array words and an integer k, return: - the...

Coding & Algorithms
14
0
141 people solved
Jan 11, 2026
Bytedance logo
Bytedance
Hard
Data Scientist

Implement stack variants and upward path sum

Question Answer the following coding questions. They progress from augmented stacks to streaming statistics to tree path reasoning. 1. MinStack — Desi...

Coding & Algorithms
2
0
39 people solved
Jan 10, 2026
Thumbtack logo
Thumbtack
Medium
Data Scientist

Estimate Two Conditional Win Probabilities by Simulation

Estimate Two Conditional Win Probabilities by Simulation You are given a game with three closed doors, labeled 0, 1, and 2. Behind exactly one door is...

Coding & Algorithms
0
0
5 people solved
Jan 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