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
Jane Street logo
Jane Street
Hard
Software Engineer

Decode an Encrypted Paragraph Tree

Decode an Encrypted Paragraph Tree A document is stored as a tree of paragraphs. Each node holds a paragraph text — a string of lowercase English lett...

Coding & Algorithms
0
0
18 people solved
Sep 14, 2022
Optiver logo
Optiver
Medium
Software Engineer

Maximum Currency Conversion Rate

Maximum Currency Conversion Rate You are given N currency exchange rate pairs. Each pair is a triple (from_currency, to_currency, rate), meaning that ...

Coding & Algorithms
0
0
9 people solved
Jan 31, 2025
Google logo
Google
Medium
Software EngineerNew Grad

Solve Banana Speed and Interval Merge

During two technical phone screens for a new graduate software engineering role, the candidate was asked to solve two coding problems: minimum eating ...

Coding & Algorithms
9
0
58 people solved
Jan 27, 2025
Google logo
Google
Medium
Software EngineerIntern

Solve Grid and Counting Problems

A software engineering intern phone screen included two coding tasks: 1. Count islands in a grid Given an m x n grid of characters where '1' re...

Coding & Algorithms
1
0
13 people solved
Jan 25, 2025
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Implement IPv4 and CIDR iterators

This question evaluates understanding of IPv4 addressing and CIDR notation, along with competency in binary/bitwise arithmetic, iterator construction,...

Coding & Algorithms
12
0
130 people solved
Jan 10, 2025
Tesla logo
Tesla
Medium
Software Engineer

Solve classic array, graph, and parsing problems

Implement and analyze solutions to the following independent tasks: 1) Expression evaluator: Given a string s of digits, '+', '-', '*', '/', and space...

Coding & Algorithms
9
0
67 people solved
Aug 14, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Determine dictionary-based string segmentation

You are given a string s and a set of tokens dict. Determine whether s can be segmented into a sequence of one or more tokens from dict. If segmentati...

Coding & Algorithms
3
0
57 people solved
Aug 14, 2025
Meta logo
Meta
Medium
Data Engineer

Solve four algorithmic library problems

Solve the following coding tasks: 1) Maximum Points from Different Categories: Given an array of items (category, points) and an integer k, choose exa...

Coding & Algorithms
9
0
87 people solved
Aug 13, 2025
Roblox logo
Roblox
Medium
Software Engineer

Find largest digit-sum bucket size

You are given two integers low and high (inclusive). Define s(x) as the sum of the decimal digits of x. For every integer x in [low, high], place x in...

Coding & Algorithms
14
0
156 people solved
Aug 13, 2025
Databricks logo
Databricks
Medium
Software Engineer

Design BFS to detect forced win in Tic-Tac-Toe

You are given an n×n Tic-Tac-Toe–like board and a target k (1 ≤ k ≤ n). From the current board state and the player to move, design an algorithm to de...

Coding & Algorithms
18
0
166 people solved
Aug 13, 2025
Apple logo
Apple
Medium
Machine Learning Engineer

Implement bag-of-words similarity search from scratch

Implement a bag-of-words–based text similarity search engine from scratch. Write code that: ( 1) tokenizes text (lowercasing, punctuation handling, Un...

Coding & Algorithms
16
0
131 people solved
Aug 13, 2025
Meta logo
Meta
Medium
Software Engineer

Solve tree traversal and interval merging tasks

Part A — Column-wise Binary Tree Grouping: You are given the root of a binary tree. Group nodes by vertical column index, where the root has column 0,...

Coding & Algorithms
4
0
37 people solved
Aug 13, 2025
Remitly logo
Remitly
Medium
Software Engineer

Solve k-Nearest Places by Latitude/Longitude

Given a set of geographic coordinates and a query point, return the k nearest locations. Describe how you compute great-circle distance (e.g., Haversi...

Coding & Algorithms
6
0
54 people solved
Aug 13, 2025
Meta logo
Meta
Medium
Software Engineer

Solve permutation successor and evaluate expressions

Part A: Given a sequence of integers that forms a permutation, rearrange it in-place to produce the immediate next sequence in lexicographic order. If...

Coding & Algorithms
3
0
27 people solved
Aug 12, 2025
ZipHQ logo
ZipHQ
Medium
Software Engineer

Compute maximum sum in a tree without adjacency

Given a tree where each node has an integer value, select a subset of nodes to maximize the sum under the constraint that if you choose a node, you ca...

Coding & Algorithms
21
0
189 people solved
Aug 12, 2025
Meta logo
Meta
Medium
Software Engineer

Implement in-place duplicate removal

Given a non-decreasing array of integers, overwrite it in-place so that each distinct value appears exactly once while preserving the order of the uni...

Coding & Algorithms
2
0
35 people solved
Aug 12, 2025
Meta logo
Meta
Medium
Software Engineer

Remove runs of length at least k

Given a string s and an integer k (k >= 2), repeatedly remove every maximal contiguous group of the same character whose length is at least k, deletin...

Coding & Algorithms
2
0
24 people solved
Aug 12, 2025
Airbnb logo
Airbnb
Medium
Software Engineer

Maximize tokens from nested crates

You are given n crates, each either locked or unlocked. Each crate i contains: an integer tokens[i]; a list of keys that can unlock other crates; and ...

Coding & Algorithms
22
1
234 people solved
Aug 12, 2025
Pika logo
Pika
Medium
Software Engineer

Implement text formatter and sum subarray products

1) Text formatter (LC-inspired variant): Given an array of words and an integer maxWidth W >= 1, break the words into lines so that the total length o...

Coding & Algorithms
5
0
79 people solved
Aug 12, 2025
Bank of America logo
Bank of America
Medium
Data Scientist

Compute maximum beauty of a string

Given a string s, define the beauty of each letter a–z as a distinct integer between 1 and 26, case-insensitive. The beauty of a string is the sum ove...

Coding & Algorithms
2
0
43 people solved
Aug 11, 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