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
Stripe logo
Stripe
Medium
Software Engineer Locked

Compute balances with transaction fees and rejections

This question evaluates transaction processing, ledger state management, handling of edge cases like insufficient funds and fixed fees, and efficient ...

Coding & Algorithms
8
0
61 people solved
Jan 22, 2026
Airtable logo
Airtable
Medium
Software Engineer Locked

Implement undo/redo with two stacks

This question evaluates a candidate's ability to design and implement efficient mutable state management and history tracking using data structures (s...

Coding & Algorithms
13
0
241 people solved
Jan 22, 2026
Crowdstrike logo
Crowdstrike
Medium
Software Engineer Locked

Count connected components in a binary grid

This question evaluates understanding of graph traversal and connected-components detection on a 2D grid, measuring the ability to model grid cells as...

Coding & Algorithms
6
0
61 people solved
Jan 22, 2026
Cloudflare logo
Cloudflare
Medium
Software Engineer Locked

Implement a rule-based rate limiter

This question evaluates a developer's ability to implement real-time rule-based rate limiting, covering rule matching, time-windowed quota enforcement...

Coding & Algorithms
5
0
72 people solved
Jan 22, 2026
Salesforce logo
Salesforce
Easy
Software Engineer Locked

Remove duplicates and find constrained longest subsequence

This question evaluates data structure manipulation and string-processing competencies, specifically linked-list deduplication and finding the longest...

Coding & Algorithms
33
0
241 people solved
Jan 22, 2026
SoFi logo
SoFi
Hard
Software Engineer

Implement chance of a personal best

You are given a simplified model for tracking race times on an obstacle course. - A course has a fixed number of obstacles. - A run records the time s...

Coding & Algorithms
18
0
149 people solved
Jan 21, 2026
Medium
Software Engineer Locked

Compute total after discounting most expensive item

This question evaluates array manipulation and numeric computation skills—specifically identifying the maximum element, applying a percentage discount...

Coding & Algorithms
5
0
54 people solved
Jan 21, 2026
Google logo
Google
Hard
Software Engineer

Implement Longest-Match Text Replacement

You are given a text string and a dictionary of replacement entries. Each dictionary entry has the form token:id, where token is a string pattern and ...

Coding & Algorithms
5
0
30 people solved
Jan 20, 2026
Upstart logo
Upstart
Medium
Software Engineer

Solve remembered OA coding tasks

The online assessment reportedly had five coding questions, but only the following three were described clearly enough to reconstruct: 1. Find the top...

Coding & Algorithms
10
0
160 people solved
Jan 20, 2026
Capital One logo
Capital One
Medium
Machine Learning Engineer Locked

Count ordered fragment pairs forming a password

This question evaluates proficiency with string manipulation, handling duplicate fragments, and combinatorial reasoning about ordered index pairs that...

Coding & Algorithms
10
0
69 people solved
Jan 20, 2026
Capital One logo
Capital One
Medium
Machine Learning Engineer Locked

Simulate round-robin package assignment to servers

This question evaluates array-based simulation and control-flow skills for load distribution, including pointer management, modular wrap-around scanni...

Coding & Algorithms
7
0
58 people solved
Jan 20, 2026
OpenAI logo
OpenAI
Medium
Software Engineer Locked

Implement an IPv4 Iterator

This question evaluates proficiency in IPv4 address representation and arithmetic, CIDR parsing, iterator API design for forward and backward traversa...

Coding & Algorithms
4
0
47 people solved
Jan 19, 2026
Airbnb logo
Airbnb
Hard
Software Engineer

Compute maze score using shortest path

You are given a grid-based maze game. - The maze is an R x C grid of characters: - '#' = wall (cannot pass) - '.' = empty cell - 'S' = current p...

Coding & Algorithms
24
1
182 people solved
Jan 19, 2026
Uber logo
Uber
Medium
Data Scientist Locked

Move zeros to front

This question evaluates array manipulation and in-place algorithm skills, specifically competency in stable element reordering, index management, and ...

Coding & Algorithms
4
0
31 people solved
Jan 18, 2026
Ramp logo
Ramp
Medium
Software Engineer Locked

Implement wildcard querySelector to extract URL

This question evaluates implementation skills for a simplified selector engine, DOM traversal and manipulation, wildcard attribute pattern matching, a...

Coding & Algorithms
41
0
341 people solved
Jan 18, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Maximize score in 15-sum card game

This question evaluates algorithmic problem-solving in combinatorial search, state-space optimization, and memoization by asking for the maximum achie...

Coding & Algorithms
9
0
109 people solved
Jan 18, 2026
xAI logo
xAI
Medium
Data Engineer

Implement two string utility functions

Implement the following Python functions: 1. number_of_character(string, char) - Return the number of times character char appears in string. - ...

Coding & Algorithms
5
0
66 people solved
Jan 17, 2026
Shopify logo
Shopify
Easy
Data Engineer Locked

Write SQL for session analytics

This question evaluates SQL proficiency and data engineering competencies, including deduplication, joins, time-series aggregation, rolling-window cal...

Coding & Algorithms
20
0
179 people solved
Jan 17, 2026
Stripe logo
Stripe
Easy
Data Engineer Locked

Compute shipping cost with tiered pricing

This question evaluates the ability to implement tiered billing and aggregate shipping costs across order line items, testing competencies in algorith...

Coding & Algorithms
6
0
71 people solved
Jan 17, 2026
Boston logo
Boston
Easy
Data Scientist

Implement palindrome check and valid parentheses

You have 20–25 minutes per problem. Implement the following two functions and be prepared to explain your approach and time/space complexity. Problem ...

Coding & Algorithms
5
0
46 people solved
Jan 17, 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