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

Compare two programs for equivalence

You are given two short programs (or functions) that process an integer array A (|A| ≤ 10^ 5). Determine whether they are functionally equivalent for ...

Coding & Algorithms
10
0
115 people solved
Sep 6, 2025
Anthropic logo
Anthropic
Medium
Software Engineer

Detect duplicate files efficiently

You are given access to a very large file system containing file paths and read access to file contents. Design an algorithm to identify groups of fil...

Coding & Algorithms
46
0
816 people solved
Sep 6, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Compare heap and stack memory

Compare heap and stack memory. Explain how each is allocated and freed, typical lifetimes of data stored there, access patterns and performance charac...

Coding & Algorithms
5
0
96 people solved
Sep 6, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Design a persistent key-value store

Design and implement an in-memory key-value store with a 'medium' layer that serializes the store to bytes for persistence. Provide four functions: se...

Coding & Algorithms
35
0
431 people solved
Sep 6, 2025
Figma logo
Figma
Medium
Software Engineer

Check Graph Reachability For File Permissions

You are given a graph representing simplified file permission inheritance. In part 1, the graph is directed and may contain cycles. Return whether the...

Coding & Algorithms
0
0
9 people solved
Apr 9, 2026
Bobyard logo
Bobyard
Medium
Software Engineer

Implement comment sorting and nesting

You are given mock comment data on the frontend. Each comment has: - id: unique comment ID - userId: author ID - timestamp: creation time - content: c...

Coding & Algorithms
5
0
44 people solved
Apr 9, 2026
Google logo
Google
Hard
Software Engineer Locked

Find Dictionary Matches for a Jammed String

This question evaluates string-processing and pattern-matching skills, specifically run-length grouping of consecutive characters and efficient dictio...

Coding & Algorithms
7
0
63 people solved
Apr 9, 2026
Databricks logo
Databricks
Hard
Software EngineerNew Grad

Find path in implicit Fibonacci tree

You are given a special family of binary trees called Fibonacci trees. The k‑th order Fibonacci tree T(k) is defined recursively: - T(1) is a single n...

Coding & Algorithms
136
0
1029 people solved
Dec 10, 2025
Reddit logo
Reddit
Medium
Machine Learning Engineer Locked

Implement a simplified memcached server

This question evaluates a candidate's ability to implement a TCP-based in-memory key-value store, exercising skills in network I/O, protocol parsing, ...

Coding & Algorithms
1
0
11 people solved
May 31, 2026
Databricks logo
Databricks
Medium
Software Engineer

Implement run-length encoding and decoding

You are given a string consisting of lowercase English letters. You need to implement run-length encoding (RLE) and its corresponding decoding. 1. Enc...

Coding & Algorithms
43
0
371 people solved
Dec 8, 2025
Rippling logo
Rippling
Medium
Software Engineer

Convert amounts between multiple currencies

You are given a set of direct currency exchange rates and a list of queries. Each exchange rate gives you how to convert from one currency to another....

Coding & Algorithms
41
0
346 people solved
Dec 8, 2025
Fuse Energy logo
Fuse Energy
Medium
Software Engineer

Implement simplified Excel with SET/GET/SUM

Implement a simplified in-memory spreadsheet that supports three operations: SET, GET, and SUM, similar to basic Excel functionality. Assumptions and ...

Coding & Algorithms
46
0
314 people solved
Dec 8, 2025
Databricks logo
Databricks
Medium
Software Engineer

Check if CIDR is fully canceled by rules

You are given: - A target CIDR block T as a string, e.g. "10.0.0.0/16". - A list of rule CIDR blocks. Each rule has: - A type: either "allow" or "de...

Coding & Algorithms
23
0
202 people solved
Dec 8, 2025
Perplexity logo
Perplexity
Hard
Software Engineer

Implement Task Dependencies and Failure

Implement a Python in-memory task manager for an AI workflow system. Each task has a unique task_id and a status. A task may depend on other tasks. If...

Coding & Algorithms
4
0
31 people solved
Apr 8, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer

Solve Magic Dictionary and unknown traversal

Solve Magic Dictionary and unknown traversal LeetCode 676. Implement Magic Dictionary Determine and implement traversal/encoding that outputs nodes as...

Coding & Algorithms
13
0
121 people solved
Aug 4, 2025
Uber logo
Uber
Medium
Software Engineer

Perform matrix Candy Crush elimination

Question Implement a function that, given an m × n integer matrix representing colored blocks (same integers = same color), performs one round of "Can...

Coding & Algorithms
4
0
70 people solved
Aug 4, 2025
Capital One logo
Capital One
Medium
Data Scientist

Critique Shell Script for Credit-Card Program Tech Round

Critique Shell Script for Credit-Card Program Tech Round Scenario Tech round for a new credit-card program: candidate is shown a 5-6 line shell script...

Coding & Algorithms
15
0
143 people solved
Aug 4, 2025
Boston Consulting Group logo
Boston Consulting Group
Medium
Data Scientist

Analyze Python Functions: Improve Readability and Efficiency

Analyze Python Functions: Improve Readability and Efficiency Scenario Zoom interview code-review segment: interviewer shares three short Python functi...

Coding & Algorithms
5
0
73 people solved
Aug 4, 2025
Cortex logo
Cortex
Medium
Software Engineer

Parse API JSON and print org chart

You will solve two practical coding tasks. Task 1: Call an HTTP API and parse JSON You are given an HTTP endpoint that returns JSON describing transit...

Coding & Algorithms
7
0
67 people solved
Dec 8, 2025
TikTok logo
TikTok
Medium
Software Engineer

Solve pair-counting and account-merging problems

Problem A — Count qualifying products You are given two integer arrays A and B, and an integer T. For each element a in A, count how many elements b i...

Coding & Algorithms
3
0
57 people solved
Dec 8, 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