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
LinkedIn logo
LinkedIn
Medium
Software EngineerSenior+

Design a Randomized Multiset

Implement a data structure for integers that allows duplicate values and supports the following operations in expected O(1) time: - insert(val): Add o...

Coding & Algorithms
3
0
43 people solved
Apr 2, 2026
Uber logo
Uber
Hard
Software Engineer

Solve Knight and Reversal Problems

The online assessment contained two coding problems: 1. Generalized knight shortest path: Given an integer n, consider an n x n chessboard with coordi...

Coding & Algorithms
17
0
114 people solved
Apr 2, 2026
Verkada logo
Verkada
Medium
Software Engineer

Merge Sorted Arrays In Place

You are given two non-decreasing integer arrays. - A has length m + n. - The first m elements of A are valid sorted numbers. - The last n elements of ...

Coding & Algorithms
12
0
111 people solved
Apr 2, 2026
Circle logo
Circle
Hard
Software Engineer

Implement Recipe Storage CRUD

Implement an in-memory RecipeStore that supports CRUD operations for recipes. Each recipe contains: - id: a string identifier in the form recipe<n> - ...

Coding & Algorithms
8
0
82 people solved
Apr 2, 2026
Shopify logo
Shopify
Medium
Machine Learning Engineer AI

Implement URL Shortening Codec

Implement a small in-memory URL-shortening component in a pair-programming interview. Expose two methods: shorten(long_url: str) -> str, which returns...

Coding & Algorithms
0
0
3 people solved
Apr 1, 2026
Workday logo
Workday
Medium
Software EngineerSenior+ Locked

Build a Fuzzy Keyword Index

This question evaluates string-processing, text-indexing, approximate string-matching, and data-structure design skills for supporting many repeated q...

Coding & Algorithms
1
0
24 people solved
Apr 1, 2026
Microsoft logo
Microsoft
Easy
Machine Learning Engineer Locked

Find Top K Largest Numbers

This question evaluates proficiency with heap/priority-queue data structures, selection algorithms, and the ability to analyze time and space complexi...

Coding & Algorithms
2
0
30 people solved
Apr 1, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Minimize deaths in spreading plant infection

This question evaluates a candidate's ability to model and simulate dynamic grid processes, reason about infection propagation and delayed state chang...

Coding & Algorithms
100
0
1051 people solved
Apr 1, 2026
Whatnot logo
Whatnot
Easy
Software Engineer Locked

Count User Journey Prefixes

This question evaluates the ability to reconstruct per-user action sequences from timestamped logs, aggregate and count path prefixes, and apply data-...

Coding & Algorithms
10
0
88 people solved
Apr 1, 2026
Microsoft logo
Microsoft
Easy
Data ScientistSenior+ Locked

Write an average-income function

This question evaluates proficiency in data manipulation and basic statistical aggregation, particularly handling missing values and computing average...

Coding & Algorithms
12
0
102 people solved
Apr 1, 2026
Bytedance logo
Bytedance
Medium
Software EngineerIntern

Reverse Words While Preserving Spaces

Implement a C++ function that reverses the order of words in a string. Assume a word is any maximal sequence of non-space characters, and the input co...

Coding & Algorithms
6
0
47 people solved
Mar 29, 2026
Disney logo
Disney
Medium
Data Engineer

Generate All Valid Combinations of Balanced Parentheses

Generate All Valid Combinations of Balanced Parentheses Given an integer n representing the number of pairs of parentheses, generate all distinct stri...

Coding & Algorithms
0
0
10 people solved
Mar 27, 2026
Verkada logo
Verkada
Hard
Software Engineer

Find and Merge Camera Alert Intervals

You are given surveillance camera readings as time-series data. Each reading is a pair (timestamp, value), sorted by timestamp. A camera is considered...

Coding & Algorithms
3
0
28 people solved
Mar 26, 2026
Otter.Ai logo
Otter.Ai
Medium
Software Engineer

Fixed-Width Text Display

Fixed-Width Text Display You are building a text display that renders a sequence of words inside a viewport of a fixed character width maxWidth. The d...

Coding & Algorithms
0
0
5 people solved
Mar 24, 2026
Meta logo
Meta
Easy
Software Engineer Locked

Implement array parity and tree level views

This question evaluates proficiency in array frequency analysis and binary tree traversal, testing skills in data structures, correctness reasoning, a...

Coding & Algorithms
5
0
38 people solved
Mar 24, 2026
Meta logo
Meta
Medium
Software Engineer

Solve Four Online Assessment Problems

Complete the following four independent coding tasks. For each task, write a function that returns the requested result. 1. Find the best value index ...

Coding & Algorithms
10
0
84 people solved
Mar 19, 2026
eBay logo
eBay
Medium
Software Engineer

Implement an In-Memory File System

Design an in-memory file system that supports file management, search, user ownership, capacity limits, copying, and compression. Each file has a uniq...

Coding & Algorithms
4
0
32 people solved
Mar 19, 2026
Uber logo
Uber
Hard
Software Engineer Locked

Solve two online assessment problems

This two-part prompt evaluates algorithmic problem-solving skills: the first problem tests optimization under index-based movement and number-theoreti...

Coding & Algorithms
12
0
122 people solved
Mar 19, 2026
Eightfoldai logo
Eightfoldai
Medium
Software Engineer

Make a Parentheses String Valid

Given a string s containing lowercase English letters and the characters '(' and ')', remove the minimum number of parentheses so that the resulting s...

Coding & Algorithms
8
0
91 people solved
Mar 19, 2026
Google logo
Google
Hard
Software Engineer Locked

Find Maximum Envelope Nesting

This question evaluates algorithmic problem-solving skills, particularly reasoning about multi-dimensional ordering, sequence optimization, and time-c...

Coding & Algorithms
4
0
72 people solved
Mar 18, 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