Katkat

practice a little every day, paws crossed ♡

Software Engineer 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 331–360 of 2629 results

  • AnthropicMediumSoftware Engineer
    Path Resolution with Symbolic Links

    Implement a filesystem path resolution function that normalizes paths containing '.', '..', and symbolic links while detecting cycles.

    Coding & AlgorithmsOnsitestring parsingstacksimulation
  • AnthropicMediumSoftware Engineer
    Same-Domain Web Crawl (BFS)

    Implement a breadth-first search crawler that traverses pages starting from a seed URL, filtering for pages sharing the same domain and properly deduplicating visited URLs.

    Coding & AlgorithmsOnsitebfsgraphstring-parsing
  • AnthropicHardSoftware Engineer
    Simulate Threshold Infection Efficiently

    Simulate a synchronous threshold-based infection process on a grid using an incremental multi-source BFS to achieve optimal linear time complexity.

    Coding & AlgorithmsOnsiteBFSGraphMatrix
  • AnthropicMediumSoftware Engineer
    Simulate stack traces from logs

    This question evaluates stack-based simulation for computing exclusive execution time in nested function call logs and stream-processing concepts for handling equal timestamps, slight reordering, and detection of N consecutive categorical events.

    Coding & AlgorithmsOnsite
  • AnthropicMediumSoftware Engineer
    Solve programming task with follow-ups

    This question evaluates algorithmic problem-solving skills, including core algorithm implementation, handling a consecutive-N-element constraint, and designing an optimization that leverages suffix-related information.

    Coding & AlgorithmsTechnical Screen
  • AnthropicMediumSoftware Engineer
    Time-Based Key-Value Store

    Design a versioned key-value store that supports storing values at specific timestamps and retrieving the most recent value at or before a given timestamp.

    Coding & AlgorithmsOnsitebinary-searchhash-tabledesign
  • AnthropicMediumSoftware Engineer
    Word Search in a Letter Grid

    This problem tests the ability to implement a backtracking search on a 2D grid, optimized with a Trie data structure to efficiently search for multiple strings simultaneously.

    Coding & AlgorithmsOnsiteTrieBacktrackingDFS
  • AntraMediumSoftware Engineer
    Character Frequency Count in a String

    This problem tests your ability to manipulate strings and utilize hash maps to count character frequencies while maintaining the original order of character appearance.

    Coding & AlgorithmsTechnical ScreenStringsHash MapAlgorithms
  • AntraMediumSoftware Engineer
    Longest Substring Without Repeating Characters

    This problem tests your ability to implement an efficient sliding window technique using a hash map to track character indices and maintain a valid substring constraint.

    Coding & AlgorithmsTechnical ScreenSliding WindowHash MapString
  • AppleMediumSoftware Engineer
    Capture Enclosed O Regions in an X/O Grid Using Union-Find Instead of Flood Fill

    Given a grid of X and O cells, capture every region of edge-connected O cells that does not touch the border by turning it into X, using a disjoint-set (union-find) structure instead of flood fill. Tests union-find implementation, mapping grid cells to set indices and correct border handling.

    Coding & AlgorithmsTechnical Screen
  • AppleHardSoftware Engineer
    Compute conflicts and minimum meeting rooms

    This question evaluates the ability to reason about interval overlaps and resource allocation, testing algorithmic thinking and efficient handling of time-interval data in scheduling contexts and belongs to the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • AppleMediumSoftware Engineer
    Compute island size in grid

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

    Coding & AlgorithmsTechnical Screen
  • AppleMediumSoftware Engineer
    Compute minimum required meeting rooms

    This question evaluates understanding of interval scheduling and resource-allocation concepts, proficiency with data structures for detecting temporal overlaps (heap and sweep-line paradigms), and the ability to analyze time and space complexity while handling edge cases.

    Coding & AlgorithmsTechnical Screen
  • AppleMediumSoftware Engineer
    Compute top three scores per student

    This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Compute top three scores per student states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsTechnical Screen
  • AppleMediumSoftware Engineer
    Convert a Roman Numeral to an Integer

    This problem tests your ability to parse string-based symbols while applying conditional arithmetic logic to handle additive and subtractive Roman numeral rules.

    Coding & AlgorithmsOnsiteStringsHash MapMath
  • AppleMediumSoftware Engineer
    Copy a Linked List with Random Pointers

    This problem tests your ability to manipulate linked structures and manage pointer state without using extra hash maps for space optimization.

    Coding & AlgorithmsOnsiteLinked ListPointer ManipulationAlgorithms
  • AppleMediumSoftware Engineer
    Count Islands in a Binary Grid

    This problem tests your ability to perform graph traversal on a 2D grid while adhering to strict memory constraints and preserving the integrity of the original data structure.

    Coding & AlgorithmsTechnical ScreenGraphsBFSIterative Traversal
  • AppleHardSoftware Engineer
    Count subarrays with sum equals k

    This problem tests your ability to optimize subarray sum calculations using prefix sums and hash maps to achieve linear time complexity.

    Coding & AlgorithmsTechnical ScreenArraysHash MapPrefix Sum
  • AppleMediumSoftware Engineer
    Count the Nodes in a Chain Reachable Only Through Left and Right Links

    Starting from one node of a chain in which every node links only to its left and right neighbors, count the nodes in the whole chain. It tests traversal in both directions from an arbitrary node, handling of chain ends and single-node chains, and the design of your own test cases.

    Coding & AlgorithmsTechnical Screen
  • AppleMediumSoftware Engineer
    Decode a Run-Length Encoded String Where a Missing Count Means One

    Implement a decoder for run-length encoded strings in which each lowercase letter is followed by an optional repeat count, so that a5b3c becomes aaaaabbbc. It tests careful string parsing, multi-digit counts, letters written without a count, and writing your own test cases.

    Coding & AlgorithmsTechnical Screen
  • AppleMediumSoftware Engineer
    Design a rolling five-minute hit counter

    This question evaluates understanding of data-structure selection, amortized time complexity, space-time trade-offs, sliding-window state management for expiring events, and the ability to design a concise API with unit tests.

    Coding & AlgorithmsTechnical Screen
  • AppleMediumSoftware Engineer
    Design a snapshotable key-value store

    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 snapshotable key-value store states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

    Coding & AlgorithmsTechnical Screen
  • AppleMediumSoftware Engineer
    Design card deck with shuffle and order

    This question evaluates understanding of data modeling and API design for a deck abstraction, algorithmic handling of randomization and sorting, and the ability to analyze time and space complexity.

    Coding & AlgorithmsOnsite
  • AppleMediumSoftware Engineer
    Determine Whether an Undirected Graph Is Two-Colorable

    Determine whether an undirected graph with disconnected components, potential self-loops, and parallel edges can be colored using two colors such that no two adjacent vertices share the same color.

    Coding & AlgorithmsTechnical Screengraphbfsdfs
  • AppleMediumSoftware Engineer
    Find All Tree Nodes at Distance K

    This problem tests tree traversal, graph representation (converting a tree to an undirected graph), and breadth-first search (BFS) to find nodes at a specific distance.

    Coding & AlgorithmsOnsiteTreesGraphsBFS
  • AppleEasySoftware Engineer
    Find Common Prefix Across Strings

    This question tests the ability to manipulate strings and iterate through arrays to find the longest common prefix among a list of words, emphasizing efficiency and edge-case handling.

    Coding & AlgorithmsTechnical ScreenStringsArraysAlgorithms
  • AppleMediumSoftware Engineer
    Find k Smallest Pair Sums

    This problem tests your ability to efficiently find the k-smallest pair sums from two sorted arrays using a heap-based approach to avoid exhaustive search.

    Coding & AlgorithmsTechnical ScreenHeapSortingTwo Pointers
  • AppleMediumSoftware Engineer
    Find the K Closest Pairs in a Sorted Array

    Implement an algorithm to find the k pairs of elements with the smallest absolute difference in a strictly increasing sorted array.

    Coding & AlgorithmsOnsiteHeapTwo PointersSorted Array
  • AppleMediumSoftware Engineer
    Find top-k frequent elements efficiently

    This question evaluates algorithmic and data-structure skills, focusing on frequency counting, heap-based selection, streaming updates, and time/space complexity analysis within the Coding & Algorithms domain.

    Coding & AlgorithmsTechnical Screen
  • AppleMediumSoftware Engineer
    Generate Tower of Hanoi moves

    This question evaluates understanding of recursion, algorithmic problem decomposition, and analysis of time complexity when generating constrained move sequences.

    Coding & AlgorithmsTechnical Screen