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 121–150 of 3276 results

  • AmazonMediumSoftware Engineer
    Count Four-Neighbor Islands in a Binary Matrix

    Count four-neighbor islands in a binary matrix and consider the connectivity state needed when rows arrive as a stream.

    Coding & AlgorithmsOnline Assessment
  • AmazonMediumSoftware Engineer
    Count expressions reaching a target sum

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Count expressions reaching a target sum states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Count partitions and equal-cost packages

    This question evaluates string-processing and combinatorial counting skills, including tracking distinct-character occurrences across contiguous partitions and using frequency-based pairing logic on arrays to form equal-cost packages.

    Coding & AlgorithmsOnline Assessment
  • AmazonMediumSoftware Engineer
    Count regions with DFS

    This question evaluates proficiency in graph traversal and grid-based connected-component detection using depth-first search on a binary m x n grid, along with algorithmic complexity analysis and techniques to avoid revisiting cells.

    Coding & AlgorithmsTechnical Screen
  • AmazonMediumSoftware Engineer
    Count the Distinct Binary Search Tree Shapes for Keys 1 to n

    Count how many structurally different binary search trees can store the keys 1 through n exactly once, for n up to 19. It tests reasoning about how tree shapes decompose and counting combinatorial structures efficiently instead of building every tree.

    Coding & AlgorithmsOther
  • AmazonHardSoftware Engineer
    Count unique Morse-code word transformations

    This question evaluates a candidate's ability to implement string transformations based on a fixed character-to-code mapping and to identify distinct results, testing competencies in encoding, string manipulation, and deduplication.

    Coding & AlgorithmsTechnical Screen
  • AmazonMediumSoftware Engineer
    Course Prerequisite Feasibility

    This question tests the ability to detect cycles in a directed graph to determine if a set of academic courses with prerequisite constraints can be completed.

    Coding & AlgorithmsTechnical ScreenGraphDFSTopological Sort
  • AmazonMediumSoftware Engineer
    Create a Binary Tree from Parent-Child Descriptions

    Construct one valid binary tree from unordered parent-child descriptions that identify left and right links. Reuse node identities across records, support children appearing before parents, and return the unique root.

    Coding & AlgorithmsTechnical Screen
  • AmazonMediumSoftware Engineer
    Design 2D DP on a DAG

    Design 2D DP on a DAG 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 Engineer
    Design LCA with flexible inputs and rule

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Design LCA with flexible inputs and rule states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsTechnical Screen
  • AmazonMediumApplied Scientist
    Design LFU cache with distributed extension

    This question evaluates understanding of cache design and frequency-based eviction policies, efficient data structures that support O(1) operations, and techniques for approximate frequency estimation and summarization in distributed streaming environments.

    Coding & AlgorithmsOnsite
  • AmazonMediumData Scientist
    Design a Scalable, Fault-Tolerant Distributed Order System

    This question evaluates system-design and algorithmic competencies, combining distributed-systems concepts — high availability, low-latency architecture, scalability levers, and fault-tolerance mechanisms — with practical binary-tree traversal and time–space complexity analysis.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Design a fixed-capacity circular queue

    This question evaluates understanding of fixed-capacity circular queue data structures, array-based indexing, modular arithmetic, and the requirement for constant-time (O(1)) enqueue/dequeue operations.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Design a hierarchical locking tree

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Design a hierarchical locking tree states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsTechnical Screen
  • AmazonMediumSoftware Engineer
    Design a no-repeat top-frequency music player

    Design a no-repeat frequency-based music player with addUserSongs and getNextSong APIs. Covers max-heap data structures, lazy deletion, cycle resets, mid-cycle song additions, and complexity.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Design a weighted random value generator

    This problem tests your ability to implement efficient weighted random selection using prefix sums and binary search, and handling state updates.

    Coding & AlgorithmsTechnical ScreenBinary SearchHash MapProbability
  • AmazonMediumSoftware Engineer
    Design faster delay-time computation

    This question evaluates a candidate's ability to design efficient array algorithms and appropriate data structures for nearest-smaller-element queries, assessing performance, correctness with duplicates, and scalability to large inputs.

    Coding & AlgorithmsOnline Assessment
  • AmazonMediumSoftware Engineer
    Design rolling-window top-K click tracker

    Design rolling-window top-K click tracker 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
  • AmazonMediumSoftware Engineer
    Detect and Break a Cycle in a Singly Linked List

    Tests detection and resolution of cycles in singly linked lists using two-pointer techniques with constant auxiliary space.

    Coding & AlgorithmsTechnical Screenlinked-listtwo-pointersfloyds-algorithm
  • AmazonMediumSoftware Engineer
    Detect cycle in a directed graph

    This question evaluates mastery of graph algorithms and graph theory concepts—specifically directed cycle detection—and assesses the ability to reason about algorithmic correctness and to analyze time and space complexity for competing approaches.

    Coding & AlgorithmsOnsite
  • AmazonMediumSoftware Engineer
    Detect cycles in lists and graphs

    This question evaluates understanding of cycle detection in linked lists and directed graphs, assessing competencies in pointer manipulation, graph traversal strategies, and reasoning about algorithmic time and space complexity within the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • AmazonMediumSoftware Engineer
    Detect words formed by multiple dictionary parts

    This question evaluates proficiency in string processing, selection and use of appropriate data structures and algorithms (hashing, tries), dynamic programming and memoization, and complexity analysis for large inputs and edge-case handling within the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • AmazonMediumData Scientist
    Determine Length of Longest Unique Substring

    This question evaluates string-processing skills and algorithmic problem-solving, including handling character uniqueness and performance considerations. Commonly asked in Coding & Algorithms interviews to assess a candidate's ability to implement efficient solutions and reason about time/space trade-offs, it targets practical application rather than purely conceptual understanding.

    Coding & AlgorithmsTechnical Screen
  • AmazonMediumSoftware Engineer
    Determine Rounds for Star Substring Threshold

    This question evaluates string-processing and algorithmic problem-solving skills, including handling incremental updates, counting substrings impacted by character replacements, and performance-aware simulation.

    Coding & AlgorithmsOnline Assessment
  • AmazonMediumSoftware Engineer
    Determine Whether All Courses Can Be Completed

    This problem tests your ability to model dependencies using a directed graph and detect cycles to determine if a set of tasks can be completed.

    Coding & AlgorithmsTechnical ScreenGraphTopological SortDFS
  • AmazonEasySoftware Engineer
    Determine Whether One Person Can Attend Every Meeting

    This problem tests your ability to handle interval sorting and linear-time overlap detection to ensure no two meetings conflict.

    Coding & AlgorithmsTechnical ScreenSortingIntervalsGreedy
  • AmazonMediumSoftware Engineer
    Determine Whether Package Weights Can Be Safely Arranged

    Tests array manipulation, counting techniques, and greedy or constraint-satisfaction logic to determine if an array can be permuted so no two adjacent elements sum to ten or more.

    Coding & AlgorithmsTechnical ScreenGreedyCountingArray
  • AmazonMediumSoftware Engineer
    Determine Whether a Binary Tree Is a Valid BST

    Determine whether an entire breadth-first encoded binary tree obeys the strict BST invariant. Use ancestor bounds rather than only parent-child checks, reject duplicates, handle numeric extremes, and discuss an iterative approach for deep trees.

    Coding & AlgorithmsTechnical Screen
  • AmazonMediumApplied Scientist
    Determine if all courses can be completed

    This problem tests your ability to model prerequisites as a directed graph and detect cycles to determine if a valid topological ordering exists.

    Coding & AlgorithmsTechnical ScreenGraphsTopological SortDFS
  • AmazonMediumSoftware Engineer
    Determine string segmentability with dictionary

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Determine string segmentability with dictionary states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsOnsite