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
Google logo
Google
Medium
Software EngineerNew Grad

Return the Lexicographically Smallest Two-Sum Index Pair

Return the Lexicographically Smallest Two-Sum Index Pair Problem Implement twoSumSmallestPair(nums, target) -> pair. Return the lexicographically smal...

Coding & Algorithms
1
0
13 people solved
Dec 8, 2025
Rippling logo
Rippling
Medium
Software Engineer AI Locked

Compare Complete and Partial Poker Hands

This question evaluates algorithmic problem-solving, combinatorial reasoning about incomplete information, and the ability to encode domain-specific r...

Coding & Algorithms
5
0
40 people solved
May 21, 2026
Snapchat logo
Snapchat
Medium
Machine Learning EngineerNew Grad Locked

Find K Nearest Points

This question evaluates proficiency with Euclidean distance metrics, selection algorithms, and efficient data structures for partial sorting, while re...

Coding & Algorithms
6
0
43 people solved
Feb 2, 2026
Roblox logo
Roblox
Medium
Data Scientist

Optimize assembly-line scheduling with changeovers

You are scheduling a simplified car-assembly line with two parallel stations S1 and S2. Each job must be processed on exactly one station, processing ...

Coding & Algorithms
12
0
97 people solved
Oct 13, 2025
Capital One logo
Capital One
Medium
Data Scientist

Fix failing tests and refactor code

You're given a small Python repo. After creating and activating a clean virtual environment, installing requirements, and running "pytest -q", two tes...

Coding & Algorithms
11
0
112 people solved
Oct 13, 2025
Scale AI logo
Scale AI
Easy
Software Engineer AI

Implement a Dependency-Aware Task Scheduler

Implement a TaskManager class with two methods: - AddTasks(tasks): add one or more tasks into the system. - ConsumeTask(): return and remove the execu...

Coding & Algorithms
14
0
211 people solved
Apr 9, 2026
Google logo
Google
Medium
Software Engineer

Design an elevator control system

Design the software for a multi-elevator control system in a high-rise building. Specify classes, scheduling algorithms for car assignments, handling ...

Coding & Algorithms
9
0
106 people solved
Sep 6, 2025
CloudKitchens logo
CloudKitchens
Medium
Software Engineer

Implement menu parser and serializer

Menu parser and serializer You are given a restaurant menu stored as plain text, where indentation represents a hierarchy of categories and items. Imp...

Coding & Algorithms
13
0
186 people solved
Nov 7, 2025
Bytedance logo
Bytedance
Hard
Software Engineer

Assign Meetings and Find the Most-Used Room

Assign Meetings and Find the Most-Used Room There are n rooms numbered from 0 through n - 1 and meetings [start, end] with distinct start times. Proce...

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

Return the Most Frequent Values in an Array

Given a non-empty integer array, return the k values that appear most frequently. Ties are broken by smaller value first. Implement: `python def top_k...

Coding & Algorithms
2
1
16 people solved
Apr 28, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Drone Circular Route — Minimum Total Travel Cost

This question tests a candidate's ability to apply dynamic programming to combinatorial optimization, specifically the Traveling Salesman Problem (TSP...

Coding & Algorithms
1
0
8 people solved
Jun 12, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer

Generate all strings by expanding wildcards

Problem Given a string s consisting only of characters '0', '1', and '', replace every '' with either '0' or '1' and return all possible resulting bin...

Coding & Algorithms
17
1
144 people solved
Dec 15, 2025
Amperity logo
Amperity
Medium
Software Engineer

Render Overlapping Rectangles on an ASCII Canvas

Render Overlapping Rectangles on an ASCII Canvas Implement render_canvas(width, height, rectangles). The canvas initially contains spaces and is retur...

Coding & Algorithms
0
0
5 people solved
Apr 7, 2026
Microsoft logo
Microsoft
Hard
Software EngineerSenior+

Implement concurrent structures and debug queue code

The coding rounds covered several implementation and debugging tasks: 1. Implement an LRU cache that supports get(key) and put(key, value) in constant...

Coding & Algorithms
5
0
41 people solved
Apr 7, 2026
Decagon logo
Decagon
Medium
Software Engineer

Count Complete Tic-Tac-Toe Game Sequences

Count Complete Tic-Tac-Toe Game Sequences Two players play on a standard 3 x 3 board. X moves first and the players alternate. A game ends immediately...

Coding & Algorithms
2
0
20 people solved
Jul 10, 2026
Amazon logo
Amazon
Hard
Software Engineer

Find a Maximum-Sum Window in a Sparse Array

Find a Maximum-Sum Window in a Sparse Array An integer array is represented by constant-value segments instead of individual elements. Each segment [s...

Coding & Algorithms
1
0
13 people solved
Jul 10, 2026
Newrelic logo
Newrelic
Hard
Software Engineer

Product of Array Except Self Without Division

Product of Array Except Self Without Division Given an integer array, return an array in which output[i] is the product of every input element except ...

Coding & Algorithms
0
0
12 people solved
Jul 10, 2026
OpenAI logo
OpenAI
Medium
Software Engineer

Implement IPv4 iterators and CIDR expansion

Problem: IPv4 Iterators and CIDR Expansion You are implementing utilities to iterate over IPv4 addresses. An IPv4 address is in dotted-decimal form: A...

Coding & Algorithms
141
0
1018 people solved
Nov 15, 2025
Microsoft logo
Microsoft
Medium
Software EngineerSenior+

Minimum Moves on a Grid with k-Cell Jumps

You are given an m x n grid. Each cell is either open or blocked: - grid[i][j] = 0 means the cell is open. - grid[i][j] = 1 means the cell is blocked....

Coding & Algorithms
0
0
10 people solved
Jun 11, 2026
Rippling logo
Rippling
Hard
Software Engineer Locked

Solve listed algorithm problems

This set of problems evaluates algorithmic problem-solving skills across selection and order-statistics, graph algorithms and traversals, connected-co...

Coding & Algorithms
14
0
96 people solved
Feb 12, 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