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

Find longest increasing contiguous subarray

This question evaluates proficiency in array processing and algorithmic optimization, focusing on recognition of contiguous subarray properties and ha...

Coding & Algorithms
14
0
110 people solved
Jan 6, 2026
Amazon logo
Amazon
Medium
Machine Learning Engineer Locked

Compute array products excluding self and top-k

This question evaluates skills in array manipulation, in-place algorithm design, numerical stability and edge-case reasoning (such as handling multipl...

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

Solve linked list, string filtering, and puzzle

This multi-part question evaluates proficiency with linked-list pointer manipulation and constant-space linear-time algorithms, pattern-driven string ...

Coding & Algorithms
6
0
42 people solved
Jan 6, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Design a weighted random value generator

This question evaluates understanding of weighted random sampling, probability-proportional selection, data structures for aggregating weights, and AP...

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

Find median of merged RLE arrays

The question evaluates understanding of run-length encoding, order-statistics (median) computation, and efficient merging of frequency-annotated seque...

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

Implement iterator merging lists with filtering

This question evaluates iterator/generator design, sequence merging, stateful filtering and deduplication, checking a candidate's ability to maintain ...

Coding & Algorithms
4
0
69 people solved
Jan 6, 2026
Stripe logo
Stripe
Medium
Software Engineer Locked

Find linked merchants by shared fields

This question evaluates the ability to model and detect entity linkages via exact field matching and weighted scoring as well as to reason about reach...

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

Implement lazy array and KV store

This question evaluates understanding of lazy evaluation and functional transformation chaining for a LazyArray alongside in-memory data structure des...

Coding & Algorithms
8
0
100 people solved
Jan 5, 2026
Bloomberg logo
Bloomberg
Medium
Software Engineer Locked

Check equal character frequencies

This question evaluates a candidate's understanding of character frequency analysis and algorithmic reasoning in string manipulation, measuring the ab...

Coding & Algorithms
1
0
37 people solved
Jan 5, 2026
Atlassian logo
Atlassian
Medium
Software Engineer

Implement agent voting with average and sorting

Design an in-memory “agent voting” module that records ratings agents give to items (e.g., tickets/articles). Requirements: - Each vote is: (agentId, ...

Coding & Algorithms
2
0
53 people solved
Jan 5, 2026
Meta logo
Meta
Medium
Software Engineer Locked

Add two binary strings

This question evaluates proficiency with binary arithmetic and string manipulation, focusing on carry propagation and handling of very long inputs wit...

Coding & Algorithms
3
0
33 people solved
Jan 5, 2026
Google logo
Google
Easy
Software Engineer Locked

Compute minimum meeting rooms on circular day

This question evaluates a candidate's ability to reason about interval scheduling, circular time wrap-around, and resource allocation for overlapping ...

Coding & Algorithms
9
0
70 people solved
Jan 4, 2026
Google logo
Google
Medium
Software Engineer Locked

Generate all subsets (handle duplicates)

This question evaluates understanding of power-set generation and handling of duplicate elements, measuring competency in combinatorics, enumeration t...

Coding & Algorithms
8
0
66 people solved
Jan 4, 2026
Google logo
Google
Medium
Software Engineer Locked

Reconstruct original array from doubled shuffle

This question evaluates array manipulation, multiset/frequency reasoning, pairing logic, and careful handling of edge cases such as zeros and negative...

Coding & Algorithms
6
0
50 people solved
Jan 4, 2026
Prodigy logo
Prodigy
Medium
Software Engineer Locked

Solve Three OA Coding Tasks

This set of problems evaluates string and array manipulation, spatial placement and packing logic, and parity-based subarray counting within the Codin...

Coding & Algorithms
1
0
22 people solved
Jan 3, 2026
Stripe logo
Stripe
Hard
Software Engineer Locked

Calculate Per-User Usage Charges

This question evaluates algorithmic data aggregation, numeric billing computations, and the ability to model proration and threshold semantics across ...

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

Compute shortest path in cyclic graph

This question evaluates understanding of graph algorithms and shortest-path computation in weighted directed graphs, including handling cycles, non-ne...

Coding & Algorithms
2
0
48 people solved
Jan 3, 2026
Meta logo
Meta
Medium
Software Engineer

Find missing ranges in interval

Given a sorted unique integer array nums and two integers lower and upper defining an inclusive interval [lower, upper], return all missing ranges not...

Coding & Algorithms
2
0
31 people solved
Aug 14, 2025
Microsoft logo
Microsoft
Medium
Software Engineer

Implement a generic tree Node class

Design and implement a Node class for a mutable rooted tree. Requirements: store value, parent, and ordered children; support add_child, remove, move_...

Coding & Algorithms
10
0
71 people solved
Aug 14, 2025
Amazon logo
Amazon
Medium
Software Engineer

Find shortest subarray to restore order

Given an integer array, find the shortest contiguous segment which, if sorted in ascending order, makes the entire array non-decreasing. Return the le...

Coding & Algorithms
3
0
46 people solved
Aug 14, 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