practice a little every day, paws crossed ♡
Coding & Algorithms Interview Questions
Practice 9403 coding, system design and machine learning questions from 546 companies, sorted by role, topic and interview round. Every question has step-by-step hints, a code runner that supports 8 languages and an AI mentor; members also get the full solution walkthrough.
- 9403
- Questions
- 546
- Companies
- 11
- Topics
- 8
- Languages
Showing 91–120 of 1706 results
- AmazonEasySoftware EngineerFind the Lowest Common Ancestor in a Binary Tree
This problem tests tree traversal techniques and recursive logic to identify the deepest node that is an ancestor to two specified nodes within a binary tree.
Coding & AlgorithmsTechnical ScreenBinary TreeRecursionDFS - AmazonEasySoftware EngineerFind the Most Frequently Used Meeting Room
Simulate meeting room assignments with delayed starts and duration preservation using priority queues to find the most utilized room.
Coding & AlgorithmsTechnical ScreenHeapSimulationGreedy - AmazonEasySoftware EngineerFind the Single Value in a Sorted Array of Pairs
This problem tests the ability to optimize a linear search into a logarithmic one by leveraging the properties of sorted pairs using binary search.
Coding & AlgorithmsTechnical ScreenBinary SearchArraysDivide and Conquer - AmazonMediumSoftware EngineerFind top-k lottery winners by spending
This problem tests the ability to manage top-k selection from a stream or static collection using heap data structures while enforcing deterministic tie-breaking rules.
Coding & AlgorithmsTechnical ScreenHeapsSortingAlgorithms - AmazonMediumApplied ScientistFind two numbers that sum to target
This question evaluates a candidate's competency in basic algorithmic problem-solving within the Coding & Algorithms domain, focusing on array manipulation, pair-sum reasoning, and analysis of time-space trade-offs.
Coding & AlgorithmsTechnical Screen - AmazonMediumSoftware EngineerFind when failures started in log stream
This problem tests the ability to identify the first occurrence of a specific condition in a sorted boolean stream using a modified binary search approach.
Coding & AlgorithmsTechnical ScreenBinary SearchAlgorithmsOptimization - AmazonMediumSoftware EngineerFrequency Stack with Recency Tie-Breaking
Design a frequency stack data structure that supports pushing elements and popping the most frequent element, breaking ties by choosing the most recently pushed element, with both operations running in O(1) time.
Coding & AlgorithmsTechnical Screenstackhash-tabledesign - AmazonMediumData ScientistGenerate Synthetic Clickstream Data with Python Function
This question evaluates a candidate's ability to implement synthetic data generation and probabilistic event simulation in Python using libraries like pandas and numpy, emphasizing timestamp handling, random sampling, and feature engineering for clickstream records.
Coding & AlgorithmsTechnical Screen - AmazonMediumData ScientistGenerate primes up to n efficiently
This question evaluates algorithm design and complexity analysis for prime generation, focusing on sieving techniques and time-space trade-offs when producing primes up to large n.
Coding & AlgorithmsTechnical Screen - AmazonMediumApplied ScientistHighest Average-Salary Team in an Org Chart
Tests bottom-up tree traversal to compute subtree aggregates (sum and count) and identify an optimal node using multi-level tie-breaking rules.
Coding & AlgorithmsTechnical Screentreedfsrecursion - AmazonMediumSoftware EngineerImplement Cache and Count Components
This question evaluates a candidate's ability to design and implement efficient data structures for constant-time operations and to reason about graph connectivity and component counting, falling under the Coding & Algorithms domain and requiring practical implementation with algorithmic complexity reasoning.
Coding & AlgorithmsTechnical Screen - AmazonHardSoftware EngineerImplement Datacenter Router Commands
This problem tests your ability to manage stateful data structures, perform geometric calculations (Haversine formula), and implement multi-level sorting logic to simulate router command processing.
Coding & AlgorithmsTechnical ScreenData StructuresGeometryAlgorithms - AmazonMediumSoftware EngineerImplement Event Filtering and Queue Routing
Implement an in-memory event routing engine that matches nested JSON events against subscriber filter policies and routes them in subscription order.
Coding & AlgorithmsTechnical ScreenData StructuresJSON ParsingDesign - AmazonMediumData ScientistImplement Function to Determine Mode and Prime Numbers
This question evaluates algorithmic problem-solving skills, including frequency analysis for mode computation, correct handling of ties and uniqueness edge cases, and basic number-theoretic competency for prime identification.
Coding & AlgorithmsTechnical Screen - AmazonEasySoftware EngineerImplement Interview Coding Problems
This question evaluates implementation and algorithmic skills across core data structures and array/interval algorithms, specifically hashing (hash map design including collision handling and resizing), interval merging and intersection logic, and array optimization problems such as maximum container area and trapped rainwater.
Coding & AlgorithmsTechnical Screen - AmazonHardApplied ScientistImplement Optimal Bucket Batching
This question evaluates algorithm design and optimization skills, focusing on combinatorial partitioning and batching strategies, efficient utilization of parallel GPUs, and time/space complexity analysis relevant to ML data pipelines.
Coding & AlgorithmsTechnical Screen - AmazonEasySoftware EngineerImplement Regular Expression Matching
This problem tests your ability to handle recursive string matching problems using dynamic programming, specifically focusing on handling wildcard and repetition operators.
Coding & AlgorithmsTechnical ScreenDynamic ProgrammingStringsRecursion - AmazonHardSoftware EngineerImplement a Half-Open Interval Range Module
This problem tests proficiency with balanced binary search trees or interval management techniques to efficiently track and manipulate sets of half-open intervals.
Coding & AlgorithmsTechnical ScreenIntervalsBinary SearchData Structures - AmazonMediumSoftware EngineerImplement a formatted shell script output
This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Implement a formatted shell script output states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding & AlgorithmsTechnical Screen - AmazonMediumData ScientistImplement a high-throughput web crawler safely
This question evaluates competency in concurrent systems, scalable data ingestion, and algorithmic design for a high-throughput web crawler, covering URL normalization, deduplication, per-host rate limiting, fault-tolerant checkpointing, and bounded-memory queueing.
Coding & AlgorithmsTechnical Screen - AmazonMediumSoftware EngineerImplement a robust shell CLI
This question evaluates proficiency in POSIX-compliant shell scripting, including positional argument parsing and validation, ISO 8601 UTC timestamp generation, file metadata extraction for license determination, construction of user@hostname, error handling and exit-code semantics, and handling of non-ASCII file paths.
Coding & AlgorithmsTechnical Screen - AmazonMediumSoftware EngineerImplement ad matching and delivery routing
Implement ad matching and delivery routing evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding & AlgorithmsTechnical Screen - AmazonMediumSoftware EngineerImplement and Analyze an LRU Query Cache
Implement a fixed-capacity least-recently-used cache for integer query results with expected constant-time get and put operations. Refresh recency on hits and updates, evict the correct key on overflow, and handle misses and duplicate puts precisely.
Coding & AlgorithmsTechnical Screen - AmazonMediumApplied ScientistImplement binary search lower/upper bounds
Implement lower_bound and upper_bound on a non-decreasing sorted array using iterative binary search in O(log n) time and O(1) space. This Amazon ML engineer screen tests precise boundary handling, loop-invariant reasoning, and edge cases like duplicates, empty arrays, and out-of-range targets.
Coding & AlgorithmsTechnical Screen - AmazonMediumSoftware EngineerImplement robust debounce and throttle in JavaScript
This question evaluates a developer's ability to implement debounce and throttle utilities in JavaScript, testing competencies in asynchronous timing, timer management, cancellation/flush semantics, error propagation, and handling edge cases such as rapid bursts, timer drift, and re-entrancy.
Coding & AlgorithmsTechnical Screen - AmazonMediumSoftware EngineerJustify choosing JavaScript for interviews
This question evaluates a candidate's ability to articulate programming language trade-offs, understand language-specific runtime behaviors (types, hoisting, closures), and justify tool choice for front-end coding tasks within the Coding & Algorithms domain.
Coding & AlgorithmsTechnical Screen - AmazonHardSoftware EngineerLowest Common Ancestor in a Binary Search Tree
Tests finding the lowest common ancestor of two values in a Binary Search Tree represented as a level-order serialized list, accounting for self-ancestorship and missing-node edge cases.
Coding & AlgorithmsTechnical ScreenBinary Search TreeTreeBreadth-First Search - AmazonHardSoftware EngineerMaximize Money in K Consecutive Bags
This problem tests your ability to efficiently manage interval operations and sliding window logic on a sparse coordinate system.
Coding & AlgorithmsTechnical ScreenSliding WindowSortingTwo Pointers - AmazonMediumSoftware EngineerMaximize Value Under a Budget
This problem tests your ability to solve a variation of the 0/1 Knapsack problem where items must be selected to maximize total value without exceeding a specific budget constraint.
Coding & AlgorithmsTechnical ScreenDynamic ProgrammingOptimizationAlgorithms - AmazonMediumFrontend EngineerMaximize the number of binary strings chosen under zero and one budgets
Given a list of binary strings and separate limits on the total number of zeros and ones, find the largest number of strings that can be chosen together without exceeding either limit. Tests optimization under two simultaneous resource limits, moving from brute force to an efficient method, and complexity analysis.
Coding & AlgorithmsTechnical Screen