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

Compress Consecutive Characters with Run Lengths

Compress Consecutive Characters with Run Lengths Implement compress_runs(s) and return the compressed string. The input contains ASCII letters only. S...

Coding & Algorithms
0
0
1 people solved
Jul 26, 2026
Oracle logo
Oracle
Medium
Software Engineer

Maximize Profit with One Stock Transaction

Maximize Profit with One Stock Transaction Implement max_profit(prices) for daily integer prices. Choose at most one buy followed by one later sell an...

Coding & Algorithms
0
0
1 people solved
Jul 26, 2026
TikTok logo
TikTok
Hard
Machine Learning Engineer Locked

Implement local maxima, bagging, and k-means

This question evaluates skills in algorithm implementation and machine learning fundamentals—specifically streaming local maxima detection, bootstrap ...

Coding & Algorithms
6
0
81 people solved
Jan 22, 2026
Grammarly logo
Grammarly
Medium
Software Engineer Locked

Deep-Copy a Linked List with Random Pointers

Clone a linked list whose records use arbitrary IDs for next and random pointers. Translate every identity and pointer through supplied fresh IDs whil...

Coding & Algorithms
1
0
16 people solved
Jun 19, 2026
Grammarly logo
Grammarly
Medium
Software Engineer Locked

Deep-Copy a Linear Linked List

Deep-copy a finite singly linked list represented by nested Python lists. Preserve values and structure while allocating every returned node independe...

Coding & Algorithms
1
0
14 people solved
Jun 19, 2026
Uber logo
Uber
Medium
Software EngineerSenior+ Locked

Implement stream queries and bounded-difference subarrays

This question evaluates proficiency in data structures and algorithmic problem-solving, covering streaming uniqueness tracking (first-non-repeated ele...

Coding & Algorithms
9
0
60 people solved
May 8, 2026
StubHub logo
StubHub
Medium
Software EngineerSenior+

Build Event Notification Engine

You are implementing part of a marketing engine for an event marketplace. Assume the following data is available: - Customer: id, city, birth_month, b...

Coding & Algorithms
21
0
170 people solved
Feb 16, 2026
Anthropic logo
Anthropic
Hard
Software Engineer Locked

Implement a Time-Aware Task Manager

This question evaluates the ability to design and implement in-memory data structures and algorithms for time-aware state management, including per-us...

Coding & Algorithms
6
0
34 people solved
May 17, 2026
DRW logo
DRW
Medium
Software EngineerIntern

Solve three algorithmic OA problems

This is an online assessment (Codility-style, 150 minutes) consisting of three independent coding problems. Solve each one separately; they do not sha...

Coding & Algorithms
21
0
180 people solved
Oct 8, 2025
Airbnb logo
Airbnb
Medium
Software Engineer Locked

Find Optimal Property Combination

This question evaluates combinatorial optimization and algorithmic problem-solving skills, focusing on subset selection under capacity constraints and...

Coding & Algorithms
2
1
53 people solved
May 26, 2026
LinkedIn logo
LinkedIn
Medium
Software Engineer

Solve common string and subarray problems

You are given three coding tasks: 1) Reverse a string - Input: a string s. - Output: the string with characters in reverse order. 2) Maximum sum of a ...

Coding & Algorithms
17
0
126 people solved
Jan 9, 2026
Google logo
Google
Medium
Software Engineer Locked

Solve Rooms and Top-K Streams

This question evaluates algorithmic problem-solving skills across interval scheduling/resource allocation and streaming top-k maintenance, testing com...

Coding & Algorithms
6
0
43 people solved
Jun 5, 2026
Tesla logo
Tesla
Easy
Software Engineer

Shortest Bridge to Connect Two Islands

You are given an n x n grid where each cell is either water (0) or land (1). Land cells that are adjacent horizontally or vertically belong to the sam...

Coding & Algorithms
1
0
11 people solved
Jun 29, 2026
Microsoft logo
Microsoft
Medium
Data Scientist

Compute the Product of an Array Except Self

The interview report preserved the input-output example but not every original restriction. The following is a self-contained version of the reported ...

Coding & Algorithms
8
1
59 people solved
May 4, 2026
Harvey logo
Harvey
Hard
Software EngineerSenior+ Locked

Design an In-Memory Spreadsheet Engine

This question tests a candidate's ability to design a dependency-tracking data structure with efficient cache invalidation, drawing on graph traversal...

Coding & Algorithms
1
0
15 people solved
Jun 4, 2026
Salesforce logo
Salesforce
Medium
Software EngineerSenior+

Solve Two OA Coding Problems

The online assessment included two coding problems: 1. In-place character run compression - You are given an array of characters. - Compress con...

Coding & Algorithms
16
0
106 people solved
Apr 5, 2026
Cohere logo
Cohere
Medium
Machine Learning Engineer Locked

Implement Autoregressive Decoding Strategies

This question evaluates proficiency with autoregressive sequence generation, probabilistic sampling methods (greedy, top-k, top-p), softmax-based prob...

Coding & Algorithms
0
0
10 people solved
May 23, 2026
Shopify logo
Shopify
Medium
Data ScientistSenior+ AI Locked

Compute Theme Similarity

This question evaluates understanding of set-based similarity metrics (the Jaccard coefficient) and practical coding skills for transforming and compa...

Coding & Algorithms
4
0
44 people solved
May 23, 2026
Anthropic logo
Anthropic
Medium
Software Engineer

Implement crawler, dedup, and persistent LRU

Implement crawler, dedup, and persistent LRU LeetCode 1236. Web Crawler: Crawl web pages starting from a given URL within the same hostname. LeetCode ...

Coding & Algorithms
114
0
786 people solved
Aug 4, 2025
Reddit logo
Reddit
Medium
Software Engineer Locked

Merge Message Context Windows

This question evaluates a candidate's skill in designing efficient algorithms and appropriate data-structure use for merging overlapping message conte...

Coding & Algorithms
22
0
186 people solved
Jan 23, 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