Katkat

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 61–90 of 1080 results

  • AmazonMediumSoftware Engineer
    Implement a Min-Priority Queue Without a Library Heap

    Tests implementation of a binary min-heap from scratch, including array-based representation, sift-up, and sift-down operations, without relying on built-in priority queue libraries.

    Coding & AlgorithmsOnsiteHeapData StructuresDesign
  • AmazonMediumData Scientist
    Implement and Analyze 'Merge k Sorted Lists' Algorithm

    This question evaluates algorithm design skills and complexity analysis for merging multiple sorted sequences, measuring proficiency with appropriate data structures, time-space trade-offs, and correctness reasoning.

    Coding & AlgorithmsOnsite
  • AmazonMediumApplied Scientist
    Implement decoder-only GPT-style transformer

    This question evaluates implementation-level mastery of transformer architectures, including multi-head masked self-attention, position-wise feed-forward networks, residual connections, and precise tensor-shape reasoning for a decoder-only language model, within the Coding & Algorithms domain of deep learning and neural network engineering.

    Coding & AlgorithmsOnsite
  • AmazonMediumApplied Scientist
    Implement integer division without using division

    This question evaluates proficiency in implementing low-level integer arithmetic and algorithmic optimization, including correct handling of overflow and edge cases within 32-bit signed integer constraints.

    Coding & AlgorithmsOnsite
  • AmazonMediumApplied Scientist
    Implement inventory allocation with backorders

    Implement inventory allocation with backorders 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 & AlgorithmsOnsite
  • AmazonMediumData Scientist
    Implement list overlap and dense-ranked word frequencies

    This question evaluates a data scientist's ability to implement efficient multiset intersection and streaming top-k word-frequency computations, covering duplicate-aware counting, dense-ranking, Unicode handling, and strict time/space constraints.

    Coding & AlgorithmsOnsite
  • AmazonMediumData Scientist
    Implement streaming k-way merge with constraints

    This question evaluates competence in streaming algorithms and resource-constrained algorithm design, specifically implementing a k-way merge over blocking, potentially unbounded integer iterators while preserving stable duplicates and reasoning about time and O(k) space complexity.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Implement tree left/right views via BFS and DFS

    This question evaluates understanding of binary tree traversal techniques and algorithmic reasoning for producing per-depth left and right views, assessing competencies in data structures, traversal ordering, and correctness across edge cases.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Implement two array-cost minimization algorithms

    This question evaluates algorithm design, data structure selection, and complexity analysis by requiring implementations for minimizing total merge cost and for removing a contiguous block to minimize the sum of adjacent absolute differences.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Jukebox That Plays the Most-Requested Song First

    Design a request queue where each play takes the song with the most pending requests, with ties going to the most recent request. Tests keeping frequency and recency together so both operations run in O(1).

    Coding & AlgorithmsOnsitedesignhash-mapstack
  • AmazonMediumSoftware Engineer
    Kth Largest Perfect Binary Subtree

    This problem tests tree traversal techniques, the ability to validate binary tree properties recursively, and the use of selection algorithms to find order statistics.

    Coding & AlgorithmsOnsiteTreesRecursionSorting
  • AmazonMediumSoftware Engineer
    Leaf Domain Cumulative Scores

    This problem tests your ability to model hierarchical data using tree traversal and string manipulation to aggregate cumulative metrics across nested domains.

    Coding & AlgorithmsOnsiteHash MapString ManipulationTree Traversal
  • AmazonMediumSoftware Engineer
    Median of a Data Stream

    Design a data structure that continuously receives a stream of integers and efficiently supports retrieving the current running median, handling potential integer overflow during the median calculation.

    Coding & AlgorithmsOnsiteHeapData StreamDesign
  • AmazonMediumSoftware Engineer
    Merge overlapping and adjacent ranges

    This question evaluates a candidate's understanding of interval merging and range manipulation, including handling overlapping and adjacent ranges, edge cases like single-point gaps and extreme values, and the ability to analyze time and space complexity.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Message Rate Limiter

    Design an in-memory message rate limiter that allows or denies messages based on whether a given time window has elapsed since their last accepted occurrence.

    Coding & AlgorithmsOnsiteHash MapDesignRate Limiter
  • AmazonHardSoftware Engineer
    Minimize Replacements So Equal Product Values Are Contiguous

    This problem tests your ability to optimize data transformations by identifying contiguous blocks of identical values, modeled as a shortest-path or dynamic programming problem on a compressed representation of the array.

    Coding & AlgorithmsOnsiteGreedyDynamic ProgrammingData Structures
  • AmazonMediumSoftware Engineer
    Minimum Moves for a Squirrel to Carry Every Nut to a Tree One at a Time

    A squirrel on an obstacle-free grid must carry every nut to a tree, holding at most one nut at a time and moving one cell per step. The task asks for the minimum total number of moves over all delivery orders, testing reasoning about grid distances and how the order of deliveries affects the total.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Order Dependent Tasks and Identify Work to Rerun

    Return any valid dependency order, detect cycles, and identify transitive reruns with a complete topological and reachability solution and order-independent validation.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Replace Delimited Tokens in a String

    This problem tests string manipulation, hash map lookups, and edge-case handling when parsing nested or malformed delimiters within a template string.

    Coding & AlgorithmsOnsiteStringsHash MapParsing
  • AmazonMediumSoftware Engineer
    Solve LeetCode string and list problems

    This set of problems evaluates proficiency in string manipulation, priority-queue/heap usage and greedy strategies, and linked-list operations including pointer management and cloning, reflecting core data structure and algorithm competencies.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Solve Nearby Inventory and Word Segmentation Tasks

    Implement two independent tasks: identify stocked centers close enough to a graph destination and return any exact dictionary segmentation of a string. Handle disconnected routes, duplicate edges, missing inventory, repeated suffix work, and large inputs while explaining complexity.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Solve Rotting Oranges and Bus Walk Reachability

    This question evaluates graph and grid traversal skills, state modeling over time, and constrained reachability combining free transit edges with Manhattan-distance walking.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Solve Shipping and Bundle-Cost Problems

    This problem tests your ability to determine the minimum capacity required to complete tasks within a deadline and optimize the cost of purchasing items grouped in bundles.

    Coding & AlgorithmsOnsiteBinary SearchDynamic ProgrammingOptimization
  • AmazonMediumSoftware Engineer
    Solve Union-Find, Graph, and Stream Problems

    This question evaluates understanding of disjoint-set (union-find) operations, directed graph processing including cycle detection and ordering, contiguous subarray sum reasoning, and online streaming/anagram detection techniques, emphasizing data structures and algorithmic problem-solving.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Solve sliding-window and heap problems

    This question evaluates algorithm design and data structure proficiency, focusing on sliding-window techniques for fixed-length subarray aggregates and heap- or hashmap-based approaches for maintaining medians in a real-time integer stream, along with considerations for concurrent execution.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Solve three coding tasks: binary search, tree path, subarray

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Solve three coding tasks: binary search, tree path, subarray states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Solve two set and graph problems

    This question evaluates proficiency in data-structure manipulation (set operations, mapping and deduplication), directed-graph modeling and traversal for reachability, and algorithmic time/space complexity analysis.

    Coding & AlgorithmsOnsite
  • AmazonMediumData Scientist
    Solve two-sum variants at scale

    This question evaluates array and hashing algorithms, pair-sum reasoning including duplicate handling and lexicographic minimality, streaming and external-memory algorithm design, trade-offs in time/space complexity, and extension to three-sum with deduplication.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Spreadsheet Formulas with Dependency Updates

    Design a simplified in-memory spreadsheet supporting direct cell assignment, formula assignment (summation with potential duplicate cell references), and retrieval with dynamic dependency propagation.

    Coding & AlgorithmsOnsitegraphdesignhash-table
  • AmazonMediumSoftware Engineer
    Stack Whose Pop Removes the Most Frequent Value, Ties Broken by Recency

    Phone screen coding problem: process push and pop operations on a stack in which every pop removes the value that currently occurs most often, breaking ties by the tied value closest to the top. It tests designing a data structure that tracks frequency and recency together efficiently.

    Coding & AlgorithmsOnsite