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
Bytedance logo
Bytedance
Medium
Data ScientistIntern

Count Same-Day Registered Posters

You are given two tables: `text users - user_id: unique identifier for a user - registered_at: timestamp when the user registered posts - post_id: uni...

Coding & Algorithms
0
0
6 people solved
Mar 14, 2026
Sealth logo
Sealth
Medium
Software Engineer Locked

Simulate Threshold Grid Infection

This question evaluates understanding of discrete grid-based simulations and local state-transition rules, focusing on modeling infection spread, neig...

Coding & Algorithms
3
0
27 people solved
Mar 13, 2026
Affirm logo
Affirm
Easy
Software Engineer Locked

Compute Available Offers per User

This question evaluates event-stream processing, stateful per-user counting, and time-window filtering competencies, requiring correctness with ordere...

Coding & Algorithms
12
0
92 people solved
Mar 13, 2026
Microsoft logo
Microsoft
Medium
Software Engineer

Implement a Snapshot Set Iterator

Implement a data structure SnapshotSet<T> with the following interface: `java interface SnapshotSet<T> { void add(T e); void remove(T e); ...

Coding & Algorithms
33
0
274 people solved
Mar 13, 2026
Hudson logo
Hudson
Hard
Software EngineerNew Grad

Implement Order Modification Feature

You are given an existing C++ trading system with a client/server architecture. The current system already supports two request types: - AddOrder(orde...

Coding & Algorithms
7
0
64 people solved
Mar 13, 2026
Stripe logo
Stripe
Medium
Software Engineer

Compute account balances with rejection and overdraft

You are given a list of transaction records as strings. Each record has the format: ` account_id,timestamp,currency,amount ` - account_id: string iden...

Coding & Algorithms
2
0
18 people solved
Dec 3, 2025
Meta logo
Meta
Easy
Data Scientist

Compute maximum score using up to 3 categories

Problem A library runs a summer reading program. Each book a student reads earns a certain number of points, and each book belongs to a category. A st...

Coding & Algorithms
5
0
72 people solved
Dec 2, 2025
Rippling logo
Rippling
Medium
Software Engineer Locked

Implement Food Delivery Billing

This question evaluates proficiency in implementing business billing rules, time and distance-based fee calculations, timestamp arithmetic, numerical ...

Coding & Algorithms
16
0
184 people solved
Mar 12, 2026
OpenAI logo
OpenAI
Medium
Software Engineer

Implement map serialization and deserialization

You are given an in-memory map (dictionary) from strings to strings. Implement two functions: - string serialize(map<string, string> m) - map<string, ...

Coding & Algorithms
78
0
616 people solved
Dec 1, 2025
Roblox logo
Roblox
Medium
Software Engineer Locked

Implement Sliding-Window Rate Limiter

This question evaluates understanding of time-based sliding-window rate limiting, per-user quota enforcement, efficient in-memory data structures for ...

Coding & Algorithms
4
0
29 people solved
Mar 11, 2026
Bloomberg logo
Bloomberg
Easy
Software Engineer

Minimize travel cost with two cities

You are scheduling candidates to attend an onsite interview. Each candidate i can fly to New York for cost c1[i] or to San Francisco for cost c2[i]. C...

Coding & Algorithms
16
2
123 people solved
Mar 11, 2026
Adobe logo
Adobe
Medium
Software Engineer

Design a nested-list iterator

You are given a nested structure that can contain integers or further lists. Design an iterator over this structure that returns integers in left-to-r...

Coding & Algorithms
9
0
72 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Software Engineer

Solve word count, node, segmentation, stock tasks

You have four tasks: 1) Count words with explicit rules: Given a text document, return the number of words. First define precisely what qualifies as a...

Coding & Algorithms
3
0
40 people solved
Sep 6, 2025
Optiver logo
Optiver
Medium
Data Scientist

Match alphanumeric patterns in a stream

Given a reference 7–8 character alphanumeric code and four candidate codes, select the exact match as quickly as possible. Design a system that: - Eff...

Coding & Algorithms
6
0
77 people solved
Sep 6, 2025
Apple logo
Apple
Medium
Software Engineer

Refactor rock–paper–scissors for config and ties

Refactor an existing Rock–Paper–Scissors tournament with three robot players so that the number of rounds is configurable and the system also tracks t...

Coding & Algorithms
7
0
130 people solved
Sep 6, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Implement an expiring GPU-credit manager

Implement an expiring GPU-credit manager for a cloud provider. Each user receives credit grants with an amount and an expiration timestamp. Support: (...

Coding & Algorithms
54
0
480 people solved
Sep 6, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Generate unique permutations with duplicates

Given an array of integers that may contain duplicates, generate all unique permutations. Ensure no duplicate permutations are returned even if some v...

Coding & Algorithms
7
0
56 people solved
Sep 6, 2025
Jane Street logo
Jane Street
Medium
Software Engineer

Implement Connect Four with bottom push-up

Implement a Connect Four variant with bottom push-up. In standard Connect Four a dropped disc falls to the lowest empty cell of a column. In this vari...

Coding & Algorithms
82
0
961 people solved
Sep 6, 2025
TikTok logo
TikTok
Medium
Software Engineer

Compute pipeline order from dependencies

You are given a set of pipelines and a list of directed dependency pairs (A, B) meaning pipeline A depends on pipeline B and therefore B must run befo...

Coding & Algorithms
6
0
48 people solved
Sep 6, 2025
IBM logo
IBM
Medium
Software Engineer

Compute shared free time intervals

You are given schedules for multiple employees. schedules[i] is a list of busy intervals for employee i, where each interval is half-open [start, end)...

Coding & Algorithms
5
0
56 people solved
Sep 6, 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