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

Compute minimum added stones to balance a tree

This question evaluates competency in tree algorithms, subtree aggregation, and integer resource balancing by requiring reasoning about hierarchical s...

Coding & Algorithms
2
0
36 people solved
Jan 8, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Find Conflicting Events

This question evaluates algorithmic problem-solving in coding and algorithms, focusing on grouping, sorting, and sliding-window techniques applied to ...

Coding & Algorithms
1
0
9 people solved
Jun 19, 2026
Amazon logo
Amazon
Medium
Software Engineer Locked

Kth Largest Perfect Binary Subtree

This question evaluates a candidate's ability to combine tree traversal with structural validation, requiring recognition of perfect binary subtrees a...

Coding & Algorithms
2
0
8 people solved
Jun 19, 2026
Enigma logo
Enigma
Medium
Software Engineer

Search Book Titles

You are given a list of book titles and a user query string. Return all titles that are relevant to the query. A title is considered relevant if any t...

Coding & Algorithms
3
0
34 people solved
Feb 3, 2026
SoFi logo
SoFi
Easy
Software Engineer Locked

Rearrange array to maximize positive prefix sums

This question evaluates array manipulation, prefix-sum reasoning, and greedy/combinatorial optimization skills for maximizing a permutation-based metr...

Coding & Algorithms
12
0
115 people solved
Jan 7, 2026
Uber logo
Uber
Medium
Software Engineer

Design top-K tracker with linked lists

Design top-K tracker with linked lists Design a data structure that tracks the top-K most frequent keys in a stream. Support operations increment(key)...

Coding & Algorithms
12
0
99 people solved
Aug 1, 2025
Meta logo
Meta
Medium
Software Engineer AI

Extend a Maze Solver

You are given an existing codebase for a maze game and solver. The maze is represented as a 2D grid containing: - S: start cell - T: target cell - .: ...

Coding & Algorithms
4
0
40 people solved
Jan 6, 2026
Meta logo
Meta
Medium
Software Engineer

Find Any Local Minimum with Iterative Binary Search

Find Any Local Minimum with Iterative Binary Search Given a nonempty integer array numbers, return the index of any local minimum. An index i is a loc...

Coding & Algorithms
0
0
13 people solved
Mar 2, 2026
Asana logo
Asana
Medium
Software Engineer

Implement an ASCII Art Printer

Implement an ASCII art printer. A font defines each supported character as a glyph with the same height. A glyph is a list of equal-length text rows. ...

Coding & Algorithms
4
0
33 people solved
Apr 2, 2026
Apple logo
Apple
Hard
Data Engineer

Encode and Rebuild a Binary Tree

Design two functions for a binary tree: - encode(root) -> string - decode(data) -> root Each tree node contains an integer value and has up to two chi...

Coding & Algorithms
10
0
86 people solved
Apr 2, 2026
Databricks logo
Databricks
Hard
Software EngineerNew Grad

Implement streaming RLE and bit-packed codec

You are implementing a simple compression scheme for sequences of 32‑bit signed integers. The codec should support two encoding strategies: 1. Run‑Len...

Coding & Algorithms
50
0
677 people solved
Dec 10, 2025
Amazon logo
Amazon
Medium
Machine Learning Engineer Locked

Implement Top-p (Nucleus) Sampling in NumPy

This coding question tests practical implementation of top-p (nucleus) sampling, a core decoding strategy in large language models. It evaluates NumPy...

Coding & Algorithms
0
0
11 people solved
Jun 18, 2026
Rippling logo
Rippling
Medium
Software Engineer

Compute total wages and partial-hour payments

You are given a list of workers. Each worker has: - id (string) - hourly_rate (non-negative number) - one work shift for a given day: start_time, end_...

Coding & Algorithms
24
1
269 people solved
Mar 1, 2026
Microsoft logo
Microsoft
Medium
Software Engineer Locked

Implement a type-based mutex for tasks

This question evaluates understanding of concurrency and synchronization primitives, testing the ability to design a thread-safe type-based mutex that...

Coding & Algorithms
11
0
87 people solved
Mar 1, 2026
Oura logo
Oura
Medium
Software Engineer Locked

Implement Server Number Allocation

This question evaluates the ability to design efficient stateful data structures and algorithms for resource allocation, focusing on management of per...

Coding & Algorithms
2
0
18 people solved
Apr 1, 2026
Glean logo
Glean
Medium
Software Engineer

Find the Kth Largest in Two Sorted Arrays

You are given two arrays sorted in ascending order and an integer k. Return the kth largest element among all elements from both arrays combined. Coun...

Coding & Algorithms
1
0
22 people solved
Apr 1, 2026
Toma logo
Toma
Easy
Frontend Engineer Locked

Approximate Pi from Random Points

This question evaluates a candidate's ability to implement array-processing logic and apply probabilistic numerical methods, combining basic geometric...

Coding & Algorithms
2
0
31 people solved
Apr 1, 2026
Voleon logo
Voleon
Hard
Software Engineer Locked

Process exchange prints, volume checks, and client orders

This question evaluates a candidate's ability to implement real-time stream processing, sliding-window aggregation for time-based volume calculations,...

Coding & Algorithms
36
0
443 people solved
Sep 6, 2025
CloudKitchens logo
CloudKitchens
Medium
Software Engineer

Design a menu manager with enums

Design and implement a console-based restaurant menu management program. Requirements: ( 1) There are exactly three fixed item categories represented ...

Coding & Algorithms
7
0
86 people solved
Sep 6, 2025
LinkedIn logo
LinkedIn
Medium
Software Engineer

Differentiate Java final, finalize, finally

Differentiate Java's final, finalize, and finally. Define what final means for variables, methods, and classes and give examples; explain what finaliz...

Coding & Algorithms
8
0
75 people solved
Sep 6, 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