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 421–450 of 3276 results
- 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 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 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 Kubernetes Service Dependency Queries
This question evaluates proficiency with data structures and algorithms for service inventory operations, including deterministic filtering, attribute matching, graph traversal for transitive dependency resolution, and status propagation across service graphs.
Coding & AlgorithmsOnsite - 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 FIFO Queue Using Two Stacks
This problem tests the ability to adapt data structure behaviors by implementing a First-In-First-Out (FIFO) queue using only Last-In-First-Out (LIFO) stacks.
Coding & AlgorithmsOnsiteData StructuresStacksQueues - 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 - AppleMediumSoftware EngineerImplement deep clone for complex objects
This question evaluates mastery of deep object cloning, reference and memory management, and knowledge of language runtime details such as prototypes, property descriptors, symbol-keyed and non-enumerable properties, and built-in types like Maps, Sets, Dates, RegExps, and typed arrays.
Coding & AlgorithmsTechnical Screen - AppleEasySoftware EngineerImplement flood fill using BFS and DFS
This question tests the ability to implement graph traversal algorithms (BFS and DFS) on a 2D grid, focusing on boundary conditions and state management.
Coding & AlgorithmsTechnical ScreenGraphBFSDFS - AppleMediumAnalytics EngineerImplement most frequent key without using max()
Category: Coding & Algorithms — this problem evaluates frequency counting, dictionary-based aggregation, string handling, manual maximum-finding without built-in functions, and stable tie-breaking by first appearance in the input.
Coding & AlgorithmsTechnical Screen - AppleEasyData EngineerImplement most_frequent_key without using max()
This question evaluates proficiency in Python fundamentals and object-oriented inheritance, focusing on frequency aggregation using a precomputed dictionary, iteration over mappings, and correct handling of ties and empty inputs.
Coding & AlgorithmsTechnical Screen - AppleMediumMachine Learning EngineerImplement permutations and image retrieval
This question evaluates algorithmic implementation and computational thinking across combinatorics, image processing, and vector similarity—specifically testing permutation generation, 2D convolution with explicit boundary handling, and nearest-neighbor retrieval for image embeddings.
Coding & AlgorithmsOnsite - AppleMediumSoftware EngineerImplement rotation, LRU cache, streaming median, cycle detection
This question evaluates understanding of array/matrix manipulation, cache and data structure design, streaming algorithms for median maintenance, and graph theory for cycle detection, with emphasis on algorithmic complexity analysis and handling of edge cases.
Coding & AlgorithmsOnsite - AppleMediumSoftware EngineerMaximize funds with capital-gated projects
Maximize funds with capital-gated projects 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 - AppleMediumSoftware EngineerMerge Two Strings Using the Longest Edge Overlap
Compare both suffix-to-prefix concatenation orders, merge the longest edge overlap, and favor the original string order when overlap lengths tie.
Coding & AlgorithmsOnline Assessment - AppleMediumSoftware EngineerMerge overlapping time intervals
This problem tests your ability to manipulate array-based data using sorting and linear scanning to identify and merge overlapping intervals.
Coding & AlgorithmsTechnical ScreenSortingIntervalsGreedy - AppleHardSoftware EngineerMinimum Cells to Bridge a Magic Grid
Tests graph modeling and shortest-path optimization on a 2D grid with zero-weight transitions and unit-weight bridges using 0-1 BFS or Dijkstra's algorithm.
Coding & AlgorithmsTechnical ScreenGraph0-1 BFSMatrix - AppleMediumSoftware EngineerMultiply Two Sparse Matrices
This problem tests your ability to optimize matrix multiplication by leveraging data sparsity to avoid unnecessary computations and handle memory efficiently.
Coding & AlgorithmsTechnical ScreenArraysMatricesOptimization - AppleMediumSoftware EngineerRefactor rock–paper–scissors for config and ties
This question evaluates a candidate's proficiency in object-oriented design, configuration injection, extensibility, state tracking (including ties), and testability when refactoring a Rock–Paper–Scissors tournament to support configurable rounds.
Coding & AlgorithmsOnsite - AppleMediumData ScientistRemove shortest subarray to sort array
This question evaluates proficiency in array algorithms, algorithmic efficiency (linear time and constant-space reasoning), and handling edge cases related to non-decreasing order, within the Coding & Algorithms domain.
Coding & AlgorithmsOnsite - AppleMediumMachine Learning EngineerRotate a Matrix In Place
This question evaluates proficiency in in-place matrix and array manipulation, spatial data transformation, and reasoning about time and space complexity.
Coding & AlgorithmsTechnical Screen - AppleMediumSoftware EngineerSimulate a Fixed-Capacity Least-Recently-Used Cache over a Stream of Operations
A coding question that asks you to implement a fixed-capacity key-value cache with least-recently-used eviction and run it over a stream of get and put operations. It tests precise recency and eviction rules, updates to keys already in the cache, and the design of a data structure with constant-time operations.
Coding & AlgorithmsTechnical Screen - AppleHardSoftware EngineerSmallest Valid Task Order from Dependency Pairs (Topological Sort)
Given a number of tasks and dependency pairs, return the lexicographically smallest order that completes every task while respecting all dependencies, or an empty list when a cycle makes that impossible. Tests topological sorting, cycle detection and deterministic tie-breaking on large dependency graphs.
Coding & AlgorithmsOnsite - AppleMediumSoftware EngineerSolve 15 common Apple coding questions
This set evaluates algorithmic problem-solving and data-structure competence, including mastery of hash tables, linked lists, stacks, queues, heaps, graphs, sliding-window and two-pointer techniques, complexity analysis, and in-place transformations.
Coding & AlgorithmsTechnical Screen - AppleMediumSoftware EngineerSolve 15 common interview problems
This collection evaluates algorithmic problem-solving skills, mastery of fundamental data structures (arrays, strings, hash maps, stacks, queues, trees, graphs, linked lists) and the ability to reason about time and space complexity.
Coding & AlgorithmsTechnical Screen - AppleMediumSoftware EngineerSolve Digit-Square and Grid BFS Problems
This question evaluates understanding of digit-based state convergence and cycle detection alongside graph traversal and constrained shortest-path search, testing skills in number manipulation, state-space search, and BFS-style exploration.
Coding & AlgorithmsTechnical Screen