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 9 results
Role
Google logo
Google
Hard
Software Engineer

Delete a Node From a Search Tree

Given the root of a binary search tree and an integer key, delete the node whose value equals key if it exists. Return the possibly new root while pre...

Coding & Algorithms
7
0
46 people solved
Apr 29, 2025
OpenAI logo
OpenAI
Hard
Machine Learning Engineer

Implement in-memory database insert and delete operations

Design and implement a simple in-memory database (key-value store) that supports the following operations: - insert(key, value): Insert a key-value pa...

Coding & Algorithms
12
0
170 people solved
Apr 6, 2025
Google logo
Google
Medium
Data ScientistIntern Locked

Find Longest Increasing Continuous Subarray

Solve the longest increasing contiguous subarray problem in one pass. Includes Python code, edge cases, complexity, and a follow-up for returning the ...

Coding & Algorithms
4
0
43 people solved
Mar 27, 2025
Meta logo
Meta
Hard
Software Engineer

Compute tree right view and target-sum subarrays

You are given two separate programming tasks. --- Task 1: Right-side view of a binary tree You are given the root of a binary tree. Imagine standing o...

Coding & Algorithms
3
0
28 people solved
Mar 23, 2025
Optiver logo
Optiver
Medium
Data Scientist

Make Two Apple Piles Equal With Doubling Moves

You have two piles of apples: the first pile contains a apples and the second pile contains b apples. In one move you choose one pile to be the receiv...

Coding & Algorithms
0
0
6 people solved
Mar 21, 2025
Nuro logo
Nuro
Hard
Backend Engineer

Implement BFS and a Job Scheduler

The interview report described two coding questions: grid reveal with BFS and a concurrent periodic job scheduler. Constraints & Assumptions - For the...

Coding & Algorithms
8
0
82 people solved
Feb 4, 2025
Google logo
Google
Medium
Data EngineerIntern

Count Special Index Pairs

Given an integer array nums of length n, count the number of index pairs (i, j) such that: - 0 <= i < j < n - nums[i] * nums[j] is even - j - i is odd...

Coding & Algorithms
2
0
39 people solved
Jan 26, 2025
Jane Street logo
Jane Street
Medium
Data ScientistIntern

Streaming Equivalence of Two Trade Feeds with Per-Company Ordering

A market-data system receives trade events from two independent feeds. Each event is a pair (company, trade_id) identifying one trade for one company....

Coding & Algorithms
0
0
6 people solved
Oct 12, 2022
Jane Street logo
Jane Street
Hard
Software Engineer

Snake Game: Minimum Moves to Reach the Apple

Snake Game: Minimum Moves to Reach the Apple You are simulating the classic Snake game on a grid with R rows and C columns. Cells are identified as (r...

Coding & Algorithms
1
0
13 people solved
Sep 14, 2022

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