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
Medium
Software Engineer

Compute sliding window median

Question LeetCode 480. Sliding Window Median: Given an array nums and an integer k, find the median of each sliding window of size k as the window mov...

Coding & Algorithms
10
0
50 people solved
Jul 29, 2025
Stripe logo
Stripe
Medium
Software Engineer

Process auth requests with fraud rules

Question Implement a function that, given a list of Authorization Requests (timestamp_seconds, unique_id, amount, card_number, merchant), outputs a hu...

Coding & Algorithms
62
0
113 people solved
Jul 29, 2025
Imc logo
Imc
Hard
Software Engineer

Choose container set to minimize waste

Question A pharmaceutical company is packaging liquid medicine for shipment. Each customer order has a required volume. The company can choose exactly...

Coding & Algorithms
11
0
111 people solved
Oct 6, 2025
Coinbase logo
Coinbase
Medium
Software Engineer Locked

Implement a Flappy Bird Jump Agent

This question evaluates discrete-time physics simulation, real-time decision-making under constraints, collision detection, and deterministic control-...

Coding & Algorithms
4
0
52 people solved
Mar 25, 2026
Optiver logo
Optiver
Medium
Software Engineer

Design a Balloon Festival Simulator

Implement a class BalloonFestival with the following API and rules. Goal Track hot air balloons (yours and competitors), evolving wind fields, and bal...

Coding & Algorithms
32
0
375 people solved
Jul 27, 2025
OpenAI logo
OpenAI
Medium
Software Engineer

Implement node messaging and path discovery

You have a network where each node knows only its parent and its children and can send messages to its parent and children. 1) Implement a sendMessage...

Coding & Algorithms
43
0
381 people solved
Jul 27, 2025
Meta logo
Meta
Medium
Software Engineer

Compute interval mode, BST range sum, exclusive time

You are given several independent coding tasks. A) Most frequent integer covered by intervals You are given an integer range [-M, M] and a list of inc...

Coding & Algorithms
2
0
40 people solved
Oct 2, 2025
SoFi logo
SoFi
Medium
Software Engineer Locked

Find Kth Unique Maximum

This question evaluates algorithmic problem-solving skills related to sorted arrays, deduplication, and order-statistics across combined datasets, mea...

Coding & Algorithms
2
0
44 people solved
Oct 1, 2025
Rippling logo
Rippling
Medium
Software Engineer AI Locked

Design a Driver Payroll System

This question evaluates a candidate's understanding of data structure design, time-series aggregation, and algorithmic complexity for in-memory accoun...

Coding & Algorithms
15
0
125 people solved
Mar 21, 2026
Ramp logo
Ramp
Hard
Software Engineer

Detect recurring transactions from a ledger

You are given a list of credit/debit card transactions. Each transaction has: - transaction_date (YYYY-MM-DD) - merchant (string) - amount (decimal, p...

Coding & Algorithms
43
0
498 people solved
Dec 15, 2025
Goldman Sachs logo
Goldman Sachs
Medium
Software Engineer

Find first non-repeating character index

You are given two separate coding tasks. Task 1: First Unique Character Given a string s (lowercase/ASCII letters), return the index of the first char...

Coding & Algorithms
5
0
76 people solved
Dec 15, 2025
Moveworks logo
Moveworks
Medium
Software Engineer

Find a secret word via match feedback

Word Guessing Game (Mastermind-style) You are given a list of unique candidate words wordlist. All words have the same length L and contain only lower...

Coding & Algorithms
9
0
180 people solved
Dec 15, 2025
Bloomberg logo
Bloomberg
Medium
Software Engineer

Count friend requests based on age rules

Problem You are given an array ages, where ages[i] is the age of the i-th person. A person of age A will send a friend request to a person of age B if...

Coding & Algorithms
14
0
121 people solved
Dec 15, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer

Implement K-means and solve interval/frequency tasks

Task 1 — Describe/implement K-means clustering Given: - A data matrix X with shape (n_samples, d). - An integer k (number of clusters). Explain (or wr...

Coding & Algorithms
7
0
66 people solved
Dec 15, 2025
Meta logo
Meta
Medium
Machine Learning Engineer

Compute nested depth sum and grid distance

Problem A: Weighted sum of integers in a nested list You are given a nested list structure that may contain integers or other nested lists. Define the...

Coding & Algorithms
9
0
68 people solved
Dec 15, 2025
Amazon logo
Amazon
Medium
Software Engineer

Implement ad matching and delivery routing

Implement ad matching and delivery routing Part A: Implement a data structure for an ad-matching service that supports add(campaign), remove(campaign)...

Coding & Algorithms
5
0
56 people solved
Jul 16, 2025
Microsoft logo
Microsoft
Hard
Software Engineer Locked

Solve Throughput, Rate Limiting, and LFU

This set of tasks evaluates algorithmic problem-solving, data structure design, and systems-oriented reasoning by testing throughput calculation, roll...

Coding & Algorithms
10
0
91 people solved
Mar 20, 2026
Capital One logo
Capital One
Hard
Data Scientist

Find lexicographically smallest string and elimination order

You remember two coding questions from an online assessment. Question 1: Return the lexicographically smallest string after a prefix/suffix reverse Yo...

Coding & Algorithms
10
0
77 people solved
Sep 25, 2025
Affirm logo
Affirm
Medium
Software Engineer

Determine winner in optimal-play card game

Determine winner in optimal-play card game Given a row of N cards with integer values (values may be positive, zero, or negative), two players alterna...

Coding & Algorithms
19
1
156 people solved
Jul 15, 2025
Voleon logo
Voleon
Hard
Software Engineer

Implement Kac ring with O(1) color and kstep

You are implementing a Kac ring dynamical system. Model - There are N positions arranged in a circle, indexed clockwise: 0, 1, ..., N-1. - Each positi...

Coding & Algorithms
45
0
395 people solved
Sep 24, 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