Coding & Algorithms Interview Questions

Practice 3,429 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.4k Questions 368 Companies08.11.2026
Showing 20 results
Role
Visa logo
Visa
Medium
Software EngineerSenior+

Count Connected Groups in a Relationship Matrix

Count Connected Groups in a Relationship Matrix Problem Implement countConnectedGroups(related). related is an n x n relationship matrix encoded as an...

Coding & Algorithms
0
0
5 people solved
Aug 3, 2026
Pinterest logo
Pinterest
Medium
Software Engineer

Rebalance Experiment Buckets with Minimal Reassignment

Rebalance Experiment Buckets with Minimal Reassignment Problem Implement rebalanceBuckets(bucketCount, groups, targetPercentages) -> rebalancedGroups....

Coding & Algorithms
0
0
10 people solved
Jul 23, 2026
eBay logo
eBay
Medium
Software Engineer

Search a Rotated Sorted Array in One Binary-Search Pass

Search a Rotated Sorted Array in One Binary-Search Pass Problem Implement searchRotated(values, target) -> index. values was formed by taking a strict...

Coding & Algorithms
0
0
8 people solved
Jul 26, 2026
Asana logo
Asana
Medium
Software Engineer

Return the K Closest Points with Deterministic Ties

Return the K Closest Points with Deterministic Ties Implement k_closest(points, target, k). Each point and the target are integer pairs. Return exactl...

Coding & Algorithms
0
0
4 people solved
Aug 6, 2026
Google logo
Google
Medium
Software EngineerNew Grad Locked

Generate Every Ordered Sum Using Ones and Twos

Generate every ordered string of ones and twos whose digit values sum to a target integer, with no duplicates and lexicographic output. The problem te...

Coding & Algorithms
17
1
99 people solved
Jun 17, 2026
eBay logo
eBay
Hard
Software Engineer

Determine Reachability for a Chinese-Chess Horse with Blocked Legs

Determine Reachability for a Chinese-Chess Horse with Blocked Legs Implement a function that determines whether a Chinese-chess horse can reach a targ...

Coding & Algorithms
5
1
43 people solved
Jul 9, 2026
Google logo
Google
Medium
Software Engineer Locked

Find a Horizontal Cut That Bisects Rectangle Area

Solve a computational-geometry problem that asks for the horizontal line dividing the combined area of many disjoint rectangles in half. The exercise ...

Coding & Algorithms
9
2
75 people solved
Jun 4, 2026
Serval logo
Serval
Medium
Software Engineer

Find Shared Motion Periods Across Camera Streams

Find Shared Motion Periods Across Camera Streams A camera emits readings (timestamp, intensity) sorted by strictly increasing timestamp. Intensity is ...

Coding & Algorithms
1
0
17 people solved
Jul 12, 2026
Walmart Labs logo
Walmart Labs
Easy
Software Engineer

Find the Longest Even-Length Word

Find the Longest Even-Length Word Implement longest_even_word(sentence). Words are separated by one or more spaces. Return the first word among those ...

Coding & Algorithms
0
0
2 people solved
Aug 11, 2026
eBay logo
eBay
Medium
Software Engineer

Return the K Smallest Values from Sorted Arrays

Return the K Smallest Values from Sorted Arrays Problem Implement kSmallestFromSortedArrays(arrays, takeCount) -> values. Each inner array is sorted i...

Coding & Algorithms
0
0
6 people solved
Jul 26, 2026
Lead logo
Lead
Medium
Software Engineer

Process a Mutable Stock-Price Log

Process a Mutable Stock-Price Log Build a small stock-price log and process a sequence of queries and updates. `python def process_stock_log( init...

Coding & Algorithms
2
0
25 people solved
Jul 8, 2026
Anthropic logo
Anthropic
Hard
Software Engineer

Build a Progressive Employee Tracker

Build a Progressive Employee Tracker The source reports four tracker stages but not exact calls or failure values. The command driver and ordering rul...

Coding & Algorithms
5
0
52 people solved
Jul 8, 2026
Amazon logo
Amazon
Medium
Software EngineerNew Grad

Compute Edit Distance

Compute Edit Distance Given two strings, return the minimum number of single-character operations needed to transform the first string into the second...

Coding & Algorithms
41
1
345 people solved
Jul 15, 2026
Bytedance logo
Bytedance
Hard
Software Engineer

Build the Largest Allowed Number Below a Limit

Build the Largest Allowed Number Below a Limit Problem Implement largestAllowedBelow(limit, digits) -> result. limit is a positive decimal integer rep...

Coding & Algorithms
0
0
8 people solved
Jul 21, 2026
Databricks logo
Databricks
Medium
Software Engineer

Find the Earliest Anagram Window

Find the Earliest Anagram Window Problem Implement firstAnagramStart(text, pattern) -> index. Return the zero-based start index of the earliest contig...

Coding & Algorithms
1
0
18 people solved
Jun 29, 2026
Hudson logo
Hudson
Medium
Software Engineer

Simulate Players Moving Under a Watcher's Gaze

Simulate Players Moving Under a Watcher's Gaze A one-dimensional road starts at 0 and ends at length. Each player begins at a supplied position and wa...

Coding & Algorithms
1
0
14 people solved
Jul 8, 2026
Onepay logo
Onepay
Easy
Software Engineer

Count Complete Highway Journeys from Toll Logs

Count Complete Highway Journeys from Toll Logs Each toll record is (timestamp, plate, location, booth_type). booth_type is ENTRY, MAINROAD, or EXIT. T...

Coding & Algorithms
0
0
10 people solved
Jul 19, 2026
Opendoor logo
Opendoor
Hard
Backend Engineer

Execute a TTL Key-Value Store with Transactions

Execute a TTL Key-Value Store with Transactions Problem Implement executeKvCommands(commands) -> outputs for an in-memory key-value store. Commands ar...

Coding & Algorithms
0
0
5 people solved
Jul 28, 2026
Bytedance logo
Bytedance
Medium
Machine Learning Engineer

Reverse a Linked List in Groups of K

Implement reverse_k_group(values, k) for a singly linked list represented by the array values in traversal order. Reverse every consecutive group of e...

Coding & Algorithms
0
0
6 people solved
Jul 24, 2026
Oscar logo
Oscar
Easy
Software EngineerSenior+

Find Clients Outside Provider Coverage

Problem Implement outside_coverage(providers, clients, max_distance). Each provider has an id, a list of specialties, and a two-dimensional location =...

Coding & Algorithms
1
0
15 people solved
Jul 14, 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