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 1706 results
- AnthropicMediumMachine Learning EngineerImplement cluster status tracker
This question evaluates a candidate's competence in data structures and algorithms for time-ordered state tracking, time-series indexing, conflict resolution (last-write-wins), memory-efficient storage, and concurrent system behavior under high update rates.
Coding & AlgorithmsTechnical Screen - AnthropicMediumSoftware EngineerImplement hostname-restricted web crawler
This question evaluates skills in graph traversal and cycle detection, hostname-based filtering, URL parsing, and basic network error handling. Commonly asked in Coding & Algorithms interviews, it assesses algorithmic reasoning about traversal strategy and complexity (time and space) analysis while balancing conceptual understanding with practical implementation details.
Coding & AlgorithmsTechnical Screen - AnthropicMediumSoftware EngineerSolve 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 - AntraMediumSoftware EngineerCharacter 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 EngineerLongest 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 EngineerCapture 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 EngineerCompute 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 EngineerCompute 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 EngineerCompute 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 EngineerCompute 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 EngineerCount 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 EngineerCount 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 EngineerCount 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 - AppleMediumMachine Learning EngineerDebug a PyTorch U-Net shape mismatch
This question tests your ability to calculate the output dimensions of convolutional layers in a U-Net architecture and resolve shape mismatches caused by cropping or padding requirements during feature map concatenation.
Coding & AlgorithmsTechnical ScreenPyTorchComputer VisionU-Net - AppleMediumSoftware EngineerDecode 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 EngineerDesign 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 EngineerDesign 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 EngineerDetermine 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 - AppleHardData EngineerEncode and Rebuild a Binary Tree
This question evaluates skills in data structure serialization and deserialization, binary tree representation, and algorithmic design for deterministic data formats.
Coding & AlgorithmsTechnical Screen - AppleEasySoftware EngineerFind 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 - AppleMediumData ScientistFind Maximum Sum of Contiguous Subarray Length k
This question evaluates skill in array manipulation and computing aggregate metrics over fixed-length intervals, along with understanding of algorithmic complexity and trade-offs between runtime and memory.
Coding & AlgorithmsTechnical Screen - AppleMediumMachine Learning EngineerFind Minimum Processing Rate
This problem tests your ability to use binary search on a search space to find an optimal minimum processing rate that satisfies a global deadline constraint.
Coding & AlgorithmsTechnical ScreenBinary SearchGreedyOptimization - AppleMediumSoftware EngineerFind 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 EngineerFind 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 EngineerGenerate 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 - AppleMediumMachine Learning EngineerImplement TF-IDF scoring for documents
This question evaluates understanding of information retrieval and text representation concepts—specifically TF–IDF weighting, tokenization, term frequency and document frequency—and measures competency in implementing an efficient scoring and ranking algorithm.
Coding & AlgorithmsTechnical Screen - AppleMediumSoftware EngineerImplement a debounce function
This problem tests your understanding of JavaScript closures, asynchronous timers, and the ability to maintain internal state across multiple function invocations.
Coding & AlgorithmsTechnical ScreenJavaScriptClosuresAsynchronous - AppleHardSoftware EngineerImplement a lazy inorder traversal iterator
This problem tests your ability to implement a binary tree iterator that performs inorder traversal using O(h) extra space, where h is the height of the tree, while maintaining an amortized time complexity of O(1) per call.
Coding & AlgorithmsTechnical ScreenTreesIteratorStack - AppleMediumSoftware EngineerImplement a robust socket message reader
This question evaluates understanding of socket programming, stream message framing, internal buffer management, EOF and error handling, input size limits, unit testing, and time/space complexity analysis.
Coding & AlgorithmsTechnical Screen - AppleMediumMachine Learning EngineerImplement bag-of-words similarity search from scratch
This question evaluates knowledge and implementation skills in text processing, vector-space models, and information retrieval, covering tokenization, term-frequency and TF–IDF weighting, cosine similarity, and ranking for similarity search within the Coding & Algorithms domain.
Coding & AlgorithmsTechnical Screen