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 181–210 of 3276 results
- AmazonMediumSoftware EngineerFind the Maximum Island Area
Find the largest four-neighbor island area in a binary matrix, including the component-size challenges of row-by-row streaming.
Coding & AlgorithmsOnline Assessment - AmazonMediumSoftware EngineerFind the Minimum Processing Rate to Meet a Deadline
This problem tests the ability to determine a minimum threshold using binary search on the answer space, combined with modular arithmetic and ceiling division.
Coding & AlgorithmsOnsiteBinary SearchMathOptimization - AmazonHardSoftware EngineerFind the Most Common Visit Pattern
This problem tests your ability to process chronological event data to identify the most frequent 3-step sequence, requiring efficient data structures to handle large volumes of user logs.
Coding & AlgorithmsOnsiteHash MapSortingSliding Window - AmazonMediumSoftware EngineerFind the Most Frequent Request IDs
Implement an algorithm to identify the top k most frequent request IDs from a stream of log events, breaking frequency ties by smaller ID values and handling cases where k exceeds the number of unique IDs.
Coding & AlgorithmsOnsitehash-tableheapsorting - 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 - AmazonMediumFrontend EngineerFormat a Forest of Nested Comments
This problem tests your ability to reconstruct hierarchical relationships from flat input data and format them into a visual tree representation with specific character-based connectors.
Coding & AlgorithmsOnsiteRecursionTree TraversalString Formatting - 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 - AmazonMediumSoftware EngineerGroup Anagrams Without Sorted Character Signatures
Group anagrams without sorting each word's characters, preserving repeated words and reasoning about frequency signatures and overflow-prone encodings.
Coding & AlgorithmsOnline Assessment - 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 EngineerHighest-total path through a binary tree encoded in level order
A coding problem that asks for the largest sum of any non-empty path in a binary tree given in level order, where a path may bend at one node and need not include the root or a leaf. It tests recursive reasoning over trees, correct handling of negative values, and careful decoding of the input format.
Coding & AlgorithmsOther - 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 - AmazonMediumSoftware EngineerImplement Cache and Rotate Matrix
This two-part question evaluates competency in data structure design and in-place array manipulation, specifically the ability to implement an LRU cache with O(1)-average operations (including recency management, updates, and evictions) and to rotate an n x n matrix 90 degrees clockwise in place without extra space.
Coding & AlgorithmsOnsite - 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 - AmazonMediumApplied ScientistImplement K-means and solve interval/frequency tasks
This multi-part question evaluates understanding of K-means clustering, interval-merging algorithms, and frequency-based top-k retrieval, assessing competencies in unsupervised learning concepts, algorithmic problem solving, data structures, and complexity analysis.
Coding & AlgorithmsOnsite - AmazonMediumSoftware EngineerImplement LRU cache with O(1) ops
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 LRU cache with O(1) ops states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Coding & AlgorithmsOnsite - AmazonMediumApplied ScientistImplement Multi-Head Attention from Scratch in NumPy
This problem tests your understanding of Transformer components by requiring an implementation of Multi-Head Scaled Dot-Product Attention using only NumPy, emphasizing matrix manipulations and numerical stability.
Coding & AlgorithmsOnsiteTransformersNumPyAttention - 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 - AmazonMediumApplied ScientistImplement PyTorch training loop
This question evaluates practical implementation skills in PyTorch, focusing on model and device management, batch-wise training mechanics, gradient handling, and optimizer interaction.
Coding & AlgorithmsOnsite - 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 - AmazonMediumData ScientistImplement Reservoir Sampling; Analyze Time and Space Complexity
This question evaluates understanding of streaming randomized algorithms and probabilistic reasoning—specifically reservoir sampling—along with analysis of time and space complexity and use of hash-based structures for duplicate detection; it is in the Coding & Algorithms domain and tests both conceptual probability invariants and practical implementation skills. Such problems are commonly asked to gauge a candidate's ability to design one-pass, linear-time solutions for unbounded data streams and to reason about algorithmic correctness and resource bounds in technical interviews.
Coding & AlgorithmsOnsite - AmazonMediumApplied ScientistImplement Top-p (Nucleus) Sampling in NumPy
This problem tests your ability to implement the nucleus sampling algorithm from scratch using NumPy, focusing on probability distribution processing and efficient array masking.
Coding & AlgorithmsOnsiteNumPyNLPProbability