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
Schonfeld logo
Schonfeld
Medium
Data Scientist

Find smallest N for 5-and-21 sums

You are given two positive integers: 5 and 21. We say a positive integer x is representable if it can be written in the form \[ x = 5a + 21b \] for so...

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

Implement delimiter-free string codec

Design an encoder/decoder for a list of strings. - Implement two functions: - encode(strings: List[str]) -> str - decode(blob: str) -> List[str] -...

Coding & Algorithms
13
0
110 people solved
Oct 31, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Optimize repeated-value vectors and compute exclusive times

You are given two separate coding tasks from an interview. Task 1: Optimize storage for vectors with repeated values, then compute dot product You are...

Coding & Algorithms
3
0
49 people solved
Oct 30, 2025
Meta logo
Meta
Medium
Software Engineer Locked

Implement several string, tree, and BFS problems

This multi-part problem evaluates proficiency with core data structures and algorithms: binary tree traversal with column-aligned output, string parsi...

Coding & Algorithms
6
0
49 people solved
Oct 30, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Merge multiple sorted arrays using min-heap

Problem You are given k sorted arrays of integers: - arrays[0], arrays[1], ..., arrays[k-1] - Each arrays[i] is sorted in non-decreasing order. - The ...

Coding & Algorithms
4
0
51 people solved
Oct 28, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Reverse linked list in fixed-size groups

Problem You are given the head of a singly linked list and an integer k (k >= 1). Reverse the nodes of the list in-place in groups of size k: - The no...

Coding & Algorithms
4
0
58 people solved
Oct 28, 2025
Uber logo
Uber
Medium
Software Engineer

Compute outer boundary of an N-ary tree

You are given the root of a rooted N-ary tree. Each node contains: - An integer value. - An ordered list of children from left to right (0 or more chi...

Coding & Algorithms
14
0
142 people solved
Oct 28, 2025
Google logo
Google
Easy
Data Scientist

Match payments to invoices by memo or amount

Scenario You are building a small reconciliation tool that matches payments to invoices. Data structures Assume you are given: - invoices: a list of i...

Coding & Algorithms
8
0
57 people solved
Oct 25, 2025
NVIDIA logo
NVIDIA
Medium
Software Engineer

Find all unique triplets summing to zero

Problem Given an integer array nums, return all unique triplets [nums[i], nums[j], nums[k]] such that: - i, j, and k are distinct indices (i != j != k...

Coding & Algorithms
5
0
47 people solved
Oct 23, 2025
Morgan Stanley logo
Morgan Stanley
Easy
Data Scientist

Compute win probability in coin-toss game

Two players, A and B, play the following game with a fair coin: - They toss the coin alternately: A tosses first, then B, then A, then B, and so on. -...

Coding & Algorithms
2
0
45 people solved
Oct 21, 2025
Illumio logo
Illumio
Medium
Software Engineer Locked

Count Regions in a Binary Grid

This question evaluates understanding of grid-as-graph representations, identification of connected components, and competency in algorithmic problem-...

Coding & Algorithms
1
0
18 people solved
Oct 20, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Validate parentheses with one or three bracket types

Problem Given a string s consisting only of bracket characters, determine whether it is valid. A string is valid if: - Every opening bracket has a cor...

Coding & Algorithms
5
1
65 people solved
Oct 20, 2025
Google logo
Google
Medium
Data Scientist

Match payments to invoices by memo or amount

You are building a small payment-to-invoice matching utility. Data You are given: - invoices: a list of invoice records with: - invoice_id (string) ...

Coding & Algorithms
5
0
51 people solved
Oct 19, 2025
Square logo
Square
Hard
Software Engineer

Implement transaction network queries

Problem You are building a small in-memory library to track pairwise customer transactions and answer connectivity questions about who has transacted ...

Coding & Algorithms
5
0
59 people solved
Oct 19, 2025
TikTok logo
TikTok
Hard
Data Engineer

Count islands using BFS without modifying grid

You are given an m x n binary grid grid where: - 1 represents land - 0 represents water - Islands are groups of horizontally or vertically adjacent la...

Coding & Algorithms
6
0
74 people solved
Oct 19, 2025
Uber logo
Uber
Medium
Software Engineer

Print directory tree with indentation

You are given a root directory of a filesystem represented as a tree. Each node is either a directory (can have children) or a file (no children). Pri...

Coding & Algorithms
15
0
113 people solved
Oct 18, 2025
Uber logo
Uber
Hard
Software Engineer Locked

Minimize time using elevator then climb stairs

This question evaluates a candidate's ability to model and optimize a discrete decision under resource constraints, testing algorithmic optimization, ...

Coding & Algorithms
10
0
94 people solved
Oct 18, 2025
Amazon logo
Amazon
Easy
Software Engineer

Find all cells reachable by downhill flow

Problem You are given an m x n grid heights, where heights[r][c] is the elevation of cell (r, c). A drop of water is placed at a starting cell start =...

Coding & Algorithms
9
0
58 people solved
Oct 18, 2025
Dropbox logo
Dropbox
Medium
Software Engineer

Implement hierarchical folder access check

You are asked to simulate a simple hierarchical file system and implement an access-check function. The file system consists of folders arranged in a ...

Coding & Algorithms
8
0
85 people solved
Oct 18, 2025
Google logo
Google
Easy
Software Engineer

Compute max coins with 3-step token moves

You are given a one-dimensional board with n positions represented by a string s of length n: - . = empty cell - T = token - C = coin You may move tok...

Coding & Algorithms
22
0
151 people solved
Oct 16, 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