Coding & Algorithms Interview Questions

Practice 3,469 real coding and algorithms interview questions reported from interviews at Meta, Amazon, Google, Uber and Microsoft. The mix follows what these loops actually ask: arrays and strings, hash maps, two pointers and sliding windows, binary search, linked lists, trees and graphs, BFS and DFS, recursion and backtracking, dynamic programming, heaps and priority queues, and the occasional design-a-data-structure round. Roughly four in five are rated medium, which is where most technical screens sit; 477 are hard and cluster in onsite loops. 3,033 of them open in a console where you can run your solution against the test cases in Python, Java, C++ or JavaScript. 2,712 come from Software Engineer interviews, with the rest from Machine Learning Engineer, Data Scientist and Data Engineer loops, and 404 were set as take-home projects rather than live sessions.

3.5k Questions 368 Companies08.11.2026
Showing 20 results
Role
Applied logo
Applied
Medium
Software Engineer Locked

Parse a protobuf-like schema and answer queries

This question evaluates proficiency in parsing grammar-like schemas, scope-based name resolution for nested types, symbol-table construction, and desi...

Coding & Algorithms
2
0
23 people solved
Jan 8, 2026
Uber logo
Uber
Hard
Software Engineer Locked

Solve jump maximization and palindromic path queries

This pair of problems evaluates algorithmic problem-solving skills: the first assesses array-based path optimization and stateful score maximization u...

Coding & Algorithms
9
0
86 people solved
Jan 8, 2026
SoFi logo
SoFi
Easy
Software Engineer Locked

Find maximum-occurring character in a string

This question evaluates proficiency in string manipulation and frequency counting, including correct handling of tie-breaking by earliest first occurr...

Coding & Algorithms
5
0
69 people solved
Jan 7, 2026
Databricks logo
Databricks
Hard
Software Engineer Locked

Convert an IP range to minimal CIDRs

This question evaluates understanding of IPv4 address encoding, binary and bitwise operations, and optimal interval covering for expressing consecutiv...

Coding & Algorithms
6
0
48 people solved
Jan 7, 2026
Databricks logo
Databricks
Medium
Machine Learning Engineer Locked

Implement a Lazy Array

This question evaluates understanding of lazy evaluation and deferred computation, implementation of iterator/generator-like abstractions, and the abi...

Coding & Algorithms
1
0
12 people solved
Jan 6, 2026
Anthropic logo
Anthropic
Hard
Software Engineer

Crawl Same-Domain Links

Implement a Python function that crawls a website starting from a seed URL and returns all unique pages reachable within the same domain. Assume a hel...

Coding & Algorithms
16
0
114 people solved
Jan 6, 2026
Uber logo
Uber
Medium
Software Engineer Locked

Implement an expiring counter class

This question evaluates a candidate's competency in implementing a sliding-window expiring counter, testing knowledge of streaming algorithms, data st...

Coding & Algorithms
10
0
90 people solved
Jan 6, 2026
Capital One logo
Capital One
Hard
Machine Learning Engineer Locked

Support updates and count target-sum pairs

This question evaluates data structures and algorithmic skills for dynamic pair counting, focusing on frequency management, efficient update handling,...

Coding & Algorithms
7
0
73 people solved
Jan 6, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Validate parentheses and find k-th largest

This pair of problems evaluates mastery of fundamental data structures and algorithmic techniques: Problem A tests understanding of stack-based parsin...

Coding & Algorithms
6
0
65 people solved
Jan 6, 2026
Pinterest logo
Pinterest
Medium
Software Engineer Locked

Reconstruct route from unordered travel tickets

This question evaluates understanding of directed graph concepts and sequence reconstruction, assessing the ability to reason about ordered relationsh...

Coding & Algorithms
12
0
200 people solved
Jan 6, 2026
Two Sigma logo
Two Sigma
Hard
Data Scientist Locked

Add two integer strings using digit-adder

This question evaluates proficiency in string-based arithmetic, digit-wise addition, carry propagation, and management of arbitrarily large non-negati...

Coding & Algorithms
6
0
53 people solved
Jan 6, 2026
Applied logo
Applied
Medium
Software Engineer Locked

Build message schema parser with size/type queries

This question evaluates parsing of a simple message schema, construction of mappings from field names to primitive types and byte sizes, and computati...

Coding & Algorithms
2
0
23 people solved
Jan 6, 2026
Snowflake logo
Snowflake
Medium
Software Engineer Locked

Compute total time to finish all courses

This question evaluates competency in graph algorithms and scheduling, including dependency resolution, cycle detection, and aggregation of task durat...

Coding & Algorithms
5
0
92 people solved
Jan 6, 2026
Google logo
Google
Hard
Software Engineer Locked

Minimize travel time with optional meeting point

This question evaluates a candidate's understanding of graph shortest-path computation and meeting-point optimization, testing skills in handling weig...

Coding & Algorithms
9
0
75 people solved
Jan 6, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Validate a JSON-like string

This question evaluates parsing and string-processing skills, focusing on structural validation of JSON-like text including matching and nesting of br...

Coding & Algorithms
10
0
135 people solved
Jan 6, 2026
MathWorks logo
MathWorks
Medium
Software EngineerIntern Locked

Minimize reduction cost and validate equal-sum pairs

This two-part question evaluates array manipulation and algorithmic problem-solving skills: the first task focuses on optimizing cumulative operation ...

Coding & Algorithms
2
0
41 people solved
Jan 6, 2026
Google logo
Google
Medium
Software Engineer Locked

Find where to cut cake into equal areas

This question evaluates geometric area computation, handling of piecewise-constant profiles formed by adjacent rectangles, and attention to numerical ...

Coding & Algorithms
9
0
81 people solved
Jan 6, 2026
Aurora logo
Aurora
Medium
Software Engineer Locked

Find viewing direction that sees most points

This question evaluates computational geometry skills, angular normalization and counting within a sector, and the ability to design algorithms that s...

Coding & Algorithms
9
0
112 people solved
Jan 6, 2026
TikTok logo
TikTok
Medium
Software Engineer Locked

Resolve user roles across account hierarchy

This question evaluates understanding of hierarchical data structures, role-based access control semantics, and set/map operations for computing effec...

Coding & Algorithms
3
0
32 people solved
Jan 6, 2026
TikTok logo
TikTok
Medium
Software Engineer Locked

Calculate transaction fees from CSV records

This question evaluates parsing and processing of structured transaction data, implementing multi-dimension fee computation rules (provider-, transact...

Coding & Algorithms
13
1
98 people solved
Jan 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