Katkat

practice a little every day, paws crossed ♡

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 541–570 of 3640 results

  • 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
  • AppleMediumData Scientist
    Find Smallest Missing Positive Integer in O(n) Time

    This question evaluates a candidate's skill in array algorithms and in-place algorithm design, emphasizing understanding of time and space complexity and handling edge cases when identifying the smallest missing positive integer.

    Coding & AlgorithmsOnsite
  • 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
    Give a Specific Motivation for Joining a Team

    This question assesses the candidate's ability to articulate a clear, personal, and well-researched motivation for joining a specific engineering team, moving beyond generic company enthusiasm.

    Behavioral & LeadershipOnsiteBehavioralCommunicationTeam-Fit
  • AppleHardData Scientist
    Handle conflict, priorities, and harsh clients

    This English summary evaluates conflict resolution, stakeholder management, technical judgment in model selection, risk assessment, escalation, and documentation skills within a Data Scientist role, testing Behavioral & Leadership competencies in a cross-functional, client-facing context.

    Behavioral & LeadershipOnsite
  • AppleMediumMachine Learning Engineer
    How do you prioritize and influence?

    This question evaluates prioritization, stakeholder influence, resource negotiation, cross-functional collaboration, product judgment, and execution under constraints for an AI/ML engineering role.

    Behavioral & LeadershipOnsite
  • AppleMediumMachine Learning Engineer
    Implement 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
  • AppleMediumSoftware Engineer
    Implement 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 Engineer
    Implement a Five-Minute Hit Counter

    This problem tests your ability to design a high-throughput, time-series data structure that balances memory usage with query performance.

    Software Engineering FundamentalsOnsiteData StructuresConcurrencyTime-Series
  • AppleHardSoftware Engineer
    Implement a Mutual-Exclusion Lock Without Built-In Locks

    Implement a mutual-exclusion lock without any built-in lock, mutex or semaphore, relying only on atomic operations. Tests atomic read-modify-write, memory ordering, spinning versus sleeping waiters, fairness, reentrancy, and software-only mutual exclusion when atomic instructions are unavailable.

    Software Engineering FundamentalsOnsite
  • AppleHardSoftware Engineer
    Implement a Reusable Cyclic Barrier from a Mutex and Condition Variables

    Implement a reusable cyclic barrier from a mutex and condition variables, where a fixed number of threads block until all have arrived and are then released together. Tests round tracking for safe reuse, spurious wakeups, timeout and broken-barrier semantics, an atomics-only variant and concurrency testing.

    Software Engineering FundamentalsOnsite
  • AppleHardSoftware Engineer
    Implement a Thread-Safe Bounded Blocking Queue for Producers and Consumers

    Implement a thread-safe bounded blocking queue shared by multiple producer and consumer threads, built from a mutex and condition variables instead of a library concurrent queue. Tests wait and wakeup logic, spurious wakeups, FIFO ordering, shutdown handling and the OS mechanisms beneath blocking synchronization.

    Software Engineering FundamentalsOnsite
  • AppleHardSoftware Engineer
    Implement a Thread-Safe Event Tracker Over a Sliding Time Window

    Implement a thread-safe in-memory event tracker that records events and reports the events and their count within a sliding time window. Tests time-ordered storage with amortized eviction, window boundary semantics, lock scope and clock choice, out-of-order events, and memory under high event rates.

    Software Engineering FundamentalsOnsite
  • AppleMediumMachine Learning Engineer
    Implement 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
  • AppleHardData Scientist
    Implement random forest with OOB and imbalance

    This question evaluates expertise in implementing and engineering a memory- and compute-efficient Random Forest for binary classification, covering ensemble methods, CART/Gini impurity, OOB evaluation and calibration, class-imbalance handling, reproducibility, parallel and thread-safe system design, and streaming/warm-start model updates.

    Machine LearningOnsite
  • AppleMediumSoftware Engineer
    Implement 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
  • AppleMediumAccessories Software QA Engineer
    Improve QA Benchmarks, Regression Tests, and HPC Resource Use

    Explain functional regression testing, reproducible performance benchmarks, and how to reduce shared HPC resource use without weakening test coverage.

    Software Engineering FundamentalsOnsite
  • AppleMediumSoftware Engineer
    LRU Cache with Fewer Recency Writes and Concurrent Access

    Implement a fixed-capacity least-recently-used cache with constant-time get and put, then discuss two follow-ups: cutting the shared-state writes that every read causes when it updates recency, and making the cache safe and fast under concurrent access, including how eviction order changes.

    Software Engineering FundamentalsOnsite
  • AppleMediumSoftware Engineer
    Object-Oriented Design: Hotel Room Booking System

    Tests object-oriented domain modeling, interval-overlap availability logic, and concurrency control strategies to prevent double bookings in a hotel reservation system.

    System DesignOnsiteObject-Oriented DesignConcurrencyDatabase Design
  • AppleMediumSoftware Engineer
    Optimize QA Benchmarks and Shared HPC Usage

    Optimize QA benchmark turnaround and shared HPC usage by profiling execution, controlling resources, and separating runtime savings from faster reporting.

    Software Engineering FundamentalsOnsite
  • AppleMediumMachine Learning Engineer
    Optimize image filters on device

    This question evaluates competency in on-device machine learning and performance engineering, covering algorithm choice, numerical precision trade-offs, hardware utilization (CPU/GPU/accelerator), memory layout, tiling/streaming, and trade-offs among latency, memory overhead, and battery impact.

    ML System DesignOnsite
  • AppleMediumSoftware Engineer
    Pin Down a Vague HTML Parser Prompt, Build the Element Tree, and Query It with DFS

    A coding exercise in which the HTML parser prompt is deliberately vague, so the candidate must first pin down input, output and edge cases with concrete examples. It tests building a tree from nested markup in one pass, handling void and malformed tags, and answering a query with a depth-first traversal.

    Software Engineering FundamentalsOnsite
  • AppleMediumSoftware Engineer
    Project Deep Dive: End-to-End Walkthrough, Trade-offs and Communicating Decisions

    A behavioral deep dive on your own work rather than generic situational questions. You walk through a project end to end, then defend the trade-offs you made and the alternatives you rejected, explain how you communicated technical decisions to others, and reflect on what you would change.

    Behavioral & LeadershipOnsite
  • AppleMediumSoftware Engineer
    Reduce False Failures and Classify QA Outcomes

    Reduce regression false failures with reviewed acceptance rules, then classify causes and severity without confusing test categories with observed outcomes.

    Software Engineering FundamentalsOnsite
  • AppleMediumSoftware Engineer
    Refactor 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 Scientist
    Remove 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
  • AppleMediumSoftware Engineer
    Revisit a Technical Decision That Turned Out Wrong

    This question assesses your self-awareness, integrity, and growth mindset by exploring how you handle professional mistakes and integrate those lessons into your engineering philosophy.

    Behavioral & LeadershipOnsiteBehavioralLeadershipConflict Resolution
  • AppleHardSoftware Engineer
    Smallest 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 Engineer
    Solve linked list, grid BFS, and median queries

    This problem tests your ability to manipulate linked list pointers in-place, perform a multi-source Breadth-First Search on a grid, and maintain a sorted structure to retrieve medians efficiently.

    Coding & AlgorithmsOnsiteLinked ListBFSHeaps
  • AppleMediumMachine Learning Engineer
    Solve stock and banana problems

    This question evaluates algorithmic problem-solving skills related to array processing, optimization under constraints, and reasoning about performance trade-offs by presenting a maximum single-transaction stock profit problem and a minimum banana-eating speed problem.

    Coding & AlgorithmsOnsite