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
TikTok logo
TikTok
Medium
Software Engineer

Solve string grouping and tree right-view problems

Problem 1: Group words that are anagrams You are given an array of strings words. Two strings are anagrams if they contain the same characters with th...

Coding & Algorithms
8
0
89 people solved
Feb 11, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer Locked

Solve three coding tasks from onsite

This set of tasks evaluates array-based greedy reasoning for circular route feasibility, stack-based parsing for bracket matching, and grid/graph reac...

Coding & Algorithms
11
0
119 people solved
Feb 11, 2026
Microsoft logo
Microsoft
Medium
Machine Learning Engineer Locked

Implement a resumable data loader

This question evaluates a candidate's ability to design stateful, resumable data iteration with deterministic shuffling and compact serializable check...

Coding & Algorithms
5
0
56 people solved
Feb 11, 2026
OpenAI logo
OpenAI
Hard
Software Engineer Locked

Implement type AST and infer generics

This question evaluates a candidate's ability to design an abstract syntax tree representation and implement generic type inference for a small langua...

Coding & Algorithms
26
2
363 people solved
Feb 11, 2026
Uber logo
Uber
Medium
Software Engineer

Solve these algorithmic problems

You are given the following independent coding tasks. For each task, design an algorithm and implement a function that returns the requested output. -...

Coding & Algorithms
57
1
456 people solved
Feb 11, 2026
Revolut logo
Revolut
Medium
Software EngineerNew Grad

Implement a random fixed-size load balancer

Problem: Build a simple load balancer Implement a minimal in-memory load balancer that routes each incoming request to one backend node chosen uniform...

Coding & Algorithms
24
0
193 people solved
Feb 11, 2026
LinkedIn logo
LinkedIn
Medium
Software Engineer

Check perfect square using binary search

Perfect Square Check (Binary Search) Given a positive integer n, determine whether it is a perfect square (i.e., there exists an integer x such that x...

Coding & Algorithms
10
2
145 people solved
Feb 11, 2026
Roblox logo
Roblox
Medium
Software Engineer Locked

Find most frequent call path in logs

This question evaluates stack-based simulation of single-threaded call traces, hierarchical path construction and frequency counting with deterministi...

Coding & Algorithms
30
0
246 people solved
Feb 11, 2026
Google logo
Google
Medium
Software Engineer

Validate parent array forms a tree

Problem You are given an integer array parent of length n describing a directed parent pointer for each node i (nodes are labeled 0..n-1). - parent[i]...

Coding & Algorithms
13
1
160 people solved
Feb 11, 2026
LinkedIn logo
LinkedIn
Medium
Machine Learning Engineer Locked

Sample index from probability distribution

This question evaluates proficiency in randomized algorithms and probability-based sampling, along with algorithmic preprocessing and data-structure d...

Coding & Algorithms
31
0
217 people solved
Feb 11, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Solve three array/string/graph coding tasks

This set of three coding tasks evaluates proficiency in fundamental data structures and algorithms, covering multi-way array merging, custom character...

Coding & Algorithms
4
0
59 people solved
Feb 11, 2026
Goldman Sachs logo
Goldman Sachs
Medium
Software Engineer Locked

Solve string and hashmap coding tasks

This multi-part prompt evaluates string manipulation, hash map usage for grouping and lookup, and simulation of sequential commands, along with robust...

Coding & Algorithms
8
0
97 people solved
Feb 11, 2026
Google logo
Google
Medium
Machine Learning Engineer Locked

Minimize Fence Painting Operations

This question evaluates algorithmic problem-solving and optimization skills, focusing on minimizing painting operations on an array-modeled fence and ...

Coding & Algorithms
3
1
54 people solved
Feb 10, 2026
Sumologic logo
Sumologic
Medium
Software Engineer Locked

Solve substring and access-log problems

This question evaluates proficiency in string algorithms, frequency analysis, and set/hash-based data processing by testing substring transformation u...

Coding & Algorithms
1
0
22 people solved
Feb 10, 2026
Chicago logo
Chicago
Easy
Data Scientist Locked

Determine if tree has path sum

This question evaluates understanding of binary tree data structures and traversal techniques, along with the ability to accumulate and track root-to-...

Coding & Algorithms
2
0
22 people solved
Feb 9, 2026
Microsoft logo
Microsoft
Easy
Data Scientist Locked

Traverse org chart level by level

This question evaluates understanding of hierarchical data modeling and tree traversal, specifically breadth-first (level-order) traversal and reconst...

Coding & Algorithms
6
0
45 people solved
Feb 9, 2026
Atlassian logo
Atlassian
Easy
Software Engineer Locked

Filter Invalid Data Events

This question evaluates a candidate's ability to implement data validation, deduplication, stable filtering, time-range and allow-list checks, and to ...

Coding & Algorithms
7
0
54 people solved
Feb 9, 2026
NVIDIA logo
NVIDIA
Medium
Software Engineer

Implement matrix transpose and KV store

The phone screen for a Linux-oriented software engineering role included multiple coding tasks: 1. Transpose an n x n matrix Given a square matri...

Coding & Algorithms
4
0
42 people solved
Feb 9, 2026
Apple logo
Apple
Medium
Software EngineerIntern

Solve mixed coding tasks from interviews

Solve the following interview-style coding problems (you may choose any programming language unless specified). Provide correct logic and handle edge ...

Coding & Algorithms
11
0
115 people solved
Feb 9, 2026
Pinterest logo
Pinterest
Hard
Machine Learning Engineer

Insert parentheses to minimize expression value

You are given a string expression of the form A+B, where A and B are non-empty strings of digits (no digit is '0'). You must insert exactly one pair o...

Coding & Algorithms
6
1
115 people solved
Feb 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