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
Snapchat logo
Snapchat
Hard
Software Engineer

Solve Three Algorithmic Tasks

You were asked three coding problems: 1. Count events inside a time window - You are given an initial collection of event timestamps in HH:MM:SS fo...

Coding & Algorithms
3
0
31 people solved
Mar 18, 2026
Apple logo
Apple
Medium
Machine Learning Engineer

Wrap Matching Substrings in Bold Tags

During a machine learning engineer phone screen, the coding task was: You are given a string text and a list of strings patterns. Return a new string ...

Coding & Algorithms
6
0
54 people solved
Mar 16, 2026
Robinhood logo
Robinhood
Medium
Software Engineer

Implement Calendar Layout and String Packing

The interview reportedly included two separate coding exercises: 1. Day-view calendar layout - You are given a list of events for a single day. Eac...

Coding & Algorithms
3
0
43 people solved
Mar 16, 2026
Nextdoor logo
Nextdoor
Medium
Software Engineer

Merge Weekly Time Intervals

You are given a list of time intervals within a single week. Each time is written as a day-of-week plus a 24-hour clock, for example Sat 13:00 or Mon ...

Coding & Algorithms
10
0
79 people solved
Mar 16, 2026
Booking logo
Booking
Medium
Software Engineer

Match Bookings to Payments

You are given two unsorted lists: - bookings: each record contains at least a unique booking_id - payments: each record contains at least a booking_id...

Coding & Algorithms
7
0
79 people solved
Mar 15, 2026
Generalmotors logo
Generalmotors
Hard
Machine Learning Engineer Locked

Count Islands in a Grid

This question evaluates skills in graph traversal and grid connectivity detection, testing competency in reasoning about adjacency, state management, ...

Coding & Algorithms
1
0
23 people solved
Mar 14, 2026
Meta logo
Meta
Medium
Software Engineer AI Locked

Solve array, tree, and maze problems

This question evaluates algorithmic problem-solving across arrays, binary trees, and grid pathfinding, testing competencies in array traversal and vis...

Coding & Algorithms
5
0
53 people solved
Mar 12, 2026
Ramp logo
Ramp
Medium
Software Engineer

Maximize Earnings by Converting Days Off into Workdays

Maximize Earnings by Converting Days Off into Workdays An employee is planning a work schedule for n consecutive days. For day i you are given whether...

Coding & Algorithms
1
0
9 people solved
Mar 11, 2026
OpenAI logo
OpenAI
Medium
Machine Learning Engineer Locked

Design an Editable Text Buffer

This question evaluates data structure design, mutable state management, undo/redo semantics, and prefix-based autocomplete indexing with dynamic freq...

Coding & Algorithms
22
0
168 people solved
Mar 11, 2026
Bloomberg logo
Bloomberg
Easy
Software Engineer

Check connectivity between two subway stations

You are given a description of subway stations A, B, C, D, E, ... as a graph. For each station, you are told which other stations it directly connects...

Coding & Algorithms
15
1
145 people solved
Mar 11, 2026
Bytedance logo
Bytedance
Hard
Software Engineer

Compute square root with precision

Given a non-negative integer val and a non-negative integer precise, compute the square root of val without using any built-in square-root function. R...

Coding & Algorithms
2
0
16 people solved
Mar 10, 2026
LinkedIn logo
LinkedIn
Easy
Software Engineer AI Locked

Debug Queues and Solve Arrays

This multi-part question evaluates competencies in data structures (heap invariants and in-place array manipulation), concurrent programming (designin...

Coding & Algorithms
7
0
96 people solved
Mar 10, 2026
Pinterest logo
Pinterest
Medium
Data Scientist Locked

Implement weighted random choice

This question evaluates understanding of weighted random sampling, probability distributions, input validation, and algorithmic time and space complex...

Coding & Algorithms
11
0
70 people solved
Mar 10, 2026
Netflix logo
Netflix
Hard
Software Engineer

Compute subtree sums with tree DFS

You are given an undirected tree with n nodes labeled 1..n and n-1 edges. The tree is rooted at node 1. Each node i has an integer value val[i]. Retur...

Coding & Algorithms
24
0
242 people solved
Mar 9, 2026
Upstart logo
Upstart
Medium
Software Engineer

Reverse even numbers in a list

Given an integer array nums, remove all odd numbers and return the remaining even numbers in reverse order (preserving no other ordering constraints)....

Coding & Algorithms
13
0
151 people solved
Mar 9, 2026
Meta logo
Meta
Easy
Software Engineer

Implement an in-memory database with record locking

Implement an in-memory key–record database that supports basic CRUD on fields plus an exclusive lock per record. You are given a sequence of queries. ...

Coding & Algorithms
9
0
102 people solved
Mar 8, 2026
Amazon logo
Amazon
Medium
Software EngineerIntern

Implement Cache and Count Components

You are asked to solve two independent coding problems in this session, each followed by a short discussion. This mirrors a 60-minute Amazon SDE codin...

Coding & Algorithms
35
0
408 people solved
Mar 7, 2026
eBay logo
eBay
Hard
Software EngineerSenior+

Find top co-viewed products

You are given a list of user browsing sessions, where each session is a list of product IDs, a target_product, and an integer k. A product should be c...

Coding & Algorithms
4
0
35 people solved
Mar 7, 2026
Meta logo
Meta
Medium
Software Engineer

Minimum Round-Trip Flight Cost

You are planning a round trip and want to spend as little as possible on flights. You are given two integer arrays of equal length n: - departure[i] —...

Coding & Algorithms
0
0
5 people solved
Mar 6, 2026
Meta logo
Meta
Medium
Software Engineer AI

Maximum Length of a Word Selection With All Unique Characters

You are given an array of lowercase strings words. Select a subset of these words (zero or more, chosen in any order) and concatenate them. The select...

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