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

Implement Text Layout and Query Parsing

This question evaluates string-processing and parsing competencies, covering tokenization, constrained line-wrapping and layout decisions (including p...

Coding & Algorithms
6
2
64 people solved
Mar 9, 2026
Uber logo
Uber
Easy
Machine Learning EngineerIntern

Analyze sales with groupby

You are given three pandas DataFrames representing a food delivery marketplace: - orders(order_id, product_id, quantity, unit_price, status) - product...

Coding & Algorithms
4
0
41 people solved
Mar 9, 2026
OpenAI logo
OpenAI
Medium
Machine Learning Engineer Locked

Infer Generic Return Types

This question evaluates understanding of type systems, generic unification, recursive data structures, substitution mechanics, and robust error handli...

Coding & Algorithms
13
0
108 people solved
Mar 9, 2026
Upstart logo
Upstart
Medium
Software Engineer

Decode an anagram sentence using vocabulary constraints

You are given: - vocab: a list of lowercase words (the "dictionary") - s: a string containing space-separated scrambled words Each scrambled word in s...

Coding & Algorithms
13
0
103 people solved
Mar 9, 2026
Upstart logo
Upstart
Medium
Software Engineer

Compute buffet revenue with capacity and waiting

A casino buffet has a maximum capacity capacity (number of customers that can be seated at once). You are given: 1) prices: an array where prices[i] i...

Coding & Algorithms
7
0
94 people solved
Mar 9, 2026
Upstart logo
Upstart
Medium
Software Engineer

Decrypt a twice-encrypted message using known pairs

Three people pass notes A → B → C → A. Notes are encrypted using a character-substitution cipher (a one-to-one mapping per character). You are given t...

Coding & Algorithms
6
0
106 people solved
Mar 9, 2026
Google logo
Google
Medium
Software Engineer

Return dictionary words matching a prefix

You are given a list of strings words (a dictionary) and a string prefix. Return all words in words that start with prefix. Clarifications/constraints...

Coding & Algorithms
26
0
192 people solved
Mar 9, 2026
DoorDash logo
DoorDash
Medium
Software Engineer

Compute Driver Pay with Double-Pay Windows

You are building payroll logic for a delivery platform. Given a list of order records for one delivery driver, compute the total amount the driver sho...

Coding & Algorithms
0
0
6 people solved
Mar 8, 2026
Optiver logo
Optiver
Medium
Software EngineerIntern

Implement a News Publishing System with Topic Subscriptions and Delivery Limits

You are building the core delivery engine for a news publishing service. The service continuously receives news items, stores them, and — whenever a p...

Coding & Algorithms
2
0
26 people solved
Nov 25, 2025
Google logo
Google
Medium
Data ScientistSenior+

Simulate Uniform(0,1) from random bits

Assume you have access to a function rand_bit() that returns 0 or 1 with equal probability and independent across calls. How would you generate a rand...

Coding & Algorithms
2
0
38 people solved
Nov 24, 2025
Affirm logo
Affirm
Medium
Software Engineer Locked

Aggregate loans and match repayments

This question evaluates the ability to aggregate transactional loan records and match repayment transactions to outstanding loans, testing competencie...

Coding & Algorithms
6
0
79 people solved
Mar 7, 2026
Jane Street logo
Jane Street
Medium
Machine Learning EngineerIntern

Board Simulation: Bottom-Insert Pieces with Uniform Row and Column Detection

Board Simulation: Bottom-Insert Pieces with Uniform Row and Column Detection You must simulate a 2-D game board with R rows and C columns. Each cell i...

Coding & Algorithms
1
0
18 people solved
Aug 27, 2025
Google logo
Google
Medium
Software Engineer

Return Words Matching a Typed Prefix

Given words and a query prefix, return all words starting with that prefix in lexicographic order. Implement: `python def prefix_matches(words: list[s...

Coding & Algorithms
0
0
8 people solved
Mar 6, 2026
Amazon logo
Amazon
Easy
Software EngineerNew Grad

Implement Interview Coding Problems

Solve the following independent coding tasks from a new-grad software engineering interview. 1. Implement a hash map from scratch. - Support integer k...

Coding & Algorithms
1
0
16 people solved
Nov 22, 2025
Google logo
Google
Hard
Software Engineer

Find safe travel intervals between planet influences

You are planning a space route along a one-dimensional line (the x-axis). You are given a list of planets. Each planet is represented by an integer pa...

Coding & Algorithms
12
2
88 people solved
Nov 22, 2025
Stripe logo
Stripe
Medium
Software Engineer Locked

Process Transactions and Compute Balances

This question evaluates a candidate's ability to implement stateful transaction processing, accurate integer bookkeeping across accounts and currencie...

Coding & Algorithms
1
0
21 people solved
Nov 21, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Count Nodes Using Asynchronous Messages

You are given the identifier of a root node in a distributed network. Each node represents a separate machine. A node cannot directly inspect another ...

Coding & Algorithms
3
0
25 people solved
Mar 4, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Find the First Unique Log

This question evaluates a candidate's ability to analyze and implement efficient data-processing and frequency-detection strategies on ordered string ...

Coding & Algorithms
3
0
49 people solved
Mar 4, 2026
Google logo
Google
Medium
Software Engineer Locked

Solve several coding interview problems

This set of problems evaluates proficiency in string processing and combinatorial parsing, arbitrary-precision arithmetic using string representations...

Coding & Algorithms
10
0
99 people solved
Mar 4, 2026
Walmart Labs logo
Walmart Labs
Medium
Software Engineer

Implement lexicographically smallest Two Sum

You are given an unsorted integer array nums and an integer target. Return the indices [i, j] (0-based) such that i < j and nums[i] + nums[j] == targe...

Coding & Algorithms
25
0
281 people solved
Mar 4, 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