practice a little every day, paws crossed ♡
Machine Learning 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 1–30 of 122 results
- AdobeMediumMachine Learning EngineerImplement K-means clustering from scratch
This problem tests your understanding of the K-means clustering algorithm, specifically the iterative process of centroid initialization, assignment, and update steps.
Coding & AlgorithmsTechnical ScreenK-meansClusteringUnsupervised Learning - AirbnbMediumMachine Learning EngineerMinimum Canisters to Top Up an Exact Target
Tests dynamic programming for the unbounded knapsack/coin change problem, focusing on finding the minimum number of canisters to reach an exact volume and reconstructing the optimal selection.
Coding & AlgorithmsTechnical Screendynamic-programmingknapsackarrays - AnthropicMediumMachine Learning EngineerConvert Samples into Event Intervals
This problem tests your ability to process sequential data, apply run-length encoding concepts, and implement filtering logic based on temporal constraints.
Coding & AlgorithmsTechnical ScreenArrayIntervalsData Processing - AnthropicMediumMachine Learning EngineerConvert stack samples to execution trace
This question evaluates understanding of sampled stack traces, event reconstruction, handling ambiguous or incomplete profiling data, and algorithmic reasoning about correctness and time/space complexity.
Coding & AlgorithmsTechnical Screen - 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 - 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 - 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 - 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 - 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 - 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 - AppleMediumMachine Learning EngineerWrite a generator for substring pattern matches
This question evaluates understanding of string pattern matching and generator/iterator design, testing skills in handling overlapping matches, streaming output, and worst-case time complexity considerations.
Coding & AlgorithmsTechnical Screen - Applied IntuitionMediumMachine Learning EngineerImplement a Fixed-Capacity Deque
This question evaluates proficiency with double-ended queue semantics, fixed-capacity data structure design, constant-time (O(1)) operations, and correct handling of boundary conditions and wraparound.
Coding & AlgorithmsTechnical Screen - Applied IntuitionHardMachine Learning EngineerValidate Nested Configuration Objects
This question evaluates schema validation skills including recursive data structures, primitive and composite type checking, and structured error reporting for configuration objects, categorized under Coding & Algorithms for a Machine Learning Engineer role and focused on practical implementation.
Coding & AlgorithmsTechnical Screen - BeaconfireEasyMachine Learning EngineerCheck Whether a String Is Built by Repetition
This problem tests your ability to detect periodic string patterns using string manipulation or mathematical properties, specifically focusing on efficient substring identification.
Coding & AlgorithmsTechnical ScreenStringsPattern MatchingAlgorithms - ByteDanceHardMachine Learning EngineerCombined Median of Two Sorted Integer Lists in Logarithmic Time
From a ByteDance technical screen for a machine learning engineer role: given two sorted integer arrays, return the median of all their elements combined, averaging the two middle values when the total count is even. It tests reasoning about sorted order under a logarithmic time target and edge cases such as an empty array.
Coding & AlgorithmsTechnical Screen - ByteDanceMediumMachine Learning EngineerMaximize total catch over K hours from ponds whose yield drops after each hour
Given the current hourly catch of each fishing pond and a budget of K hours, where every hour fished at a pond lowers its catch by one, compute the maximum total number of fish. It tests modeling the declining yields, choosing an optimal schedule, and meeting a time bound better than O(K log N) when K is very large.
Coding & AlgorithmsTechnical Screen - ByteDanceHardMachine Learning EngineerMinimum Number of Rooms to Host a Set of Possibly Overlapping Meetings
Given meetings as half-open start and end time intervals, compute the minimum number of rooms needed so that no room ever hosts two overlapping meetings. Tests interval reasoning, correct handling of back-to-back meetings that share an endpoint, and an efficient approach for up to 100,000 meetings.
Coding & AlgorithmsTechnical Screen - ByteDanceMediumMachine Learning EngineerReverse a Linked List in Groups of K
This problem tests your ability to manipulate pointers in a linked list structure and manage iterative or recursive state transitions for fixed-size segments.
Coding & AlgorithmsTechnical ScreenLinked ListPointersAlgorithms - CadenceMediumMachine Learning EngineerImplement Depth-First Search Traversal
This problem tests your ability to implement a recursive or iterative depth-first search (DFS) while managing state to handle cycles in a graph represented as an adjacency list.
Coding & AlgorithmsTechnical ScreenGraphsDFSRecursion - CognitivMediumMachine Learning EngineerMaintain a Streaming Median
This question evaluates understanding of streaming algorithms and dynamic data structures for maintaining order statistics, along with analysis of time complexity and memory trade-offs.
Coding & AlgorithmsTechnical Screen - DatabricksMediumMachine Learning EngineerDesign In-Memory QPS Counter
This question evaluates the ability to design and implement an in-memory time-series counter and sliding-window aggregation, emphasizing efficient data structures, handling high-frequency events, and memory-time trade-offs.
Coding & AlgorithmsTechnical Screen - DeshawMediumMachine Learning EngineerImplement sqrt and parity-based array rearrangement
In the Coding & Algorithms domain, this prompt evaluates numerical methods and precision handling for implementing a square-root function without library support, together with in-place array manipulation, partitioning and complexity reasoning for parity-based rearrangement, testing competencies in algorithm design, numerical approximation, and space-efficient data transformations. These problems are commonly asked to assess understanding of numerical stability, error bounds and iterative approximation as well as mastery of in-place ordering/partitioning strategies and time/space complexity analysis, requiring both conceptual understanding of mathematical properties and practical implementation ability.
Coding & AlgorithmsTechnical Screen - DoorDashMediumMachine Learning EngineerMinimize batches and allocate riders by time
This problem tests your ability to optimize resource scheduling by grouping tasks with overlapping time windows into the minimum number of batches, subject to capacity constraints.
Coding & AlgorithmsTechnical ScreenGreedyIntervalsBin Packing - GeneralmotorsHardMachine Learning EngineerCount Islands in a Grid
This problem tests your ability to navigate a 2D grid and identify distinct connected components using graph traversal techniques like Depth-First Search (DFS) or Breadth-First Search (BFS).
Coding & AlgorithmsTechnical ScreenGraphsDFSBFS - GleanMediumMachine Learning EngineerDetermine Reachability in Train Schedule
Solve train-schedule reachability with waiting and transfers using time-respecting graph search. The answer models earliest station arrival, preprocesses station visits, handles forward-only train routes, and explains transfer edge cases and complexity.
Coding & AlgorithmsTechnical Screen - GoogleHardMachine Learning EngineerConstruct connected crop layout and safe paths
This problem tests your ability to design a constructive grid layout that satisfies connectivity and size constraints, followed by pathfinding through dynamic or constrained environments.
Coding & AlgorithmsTechnical ScreenBacktrackingGraph TheoryBFS - GoogleMediumMachine Learning EngineerImplement a Transformer Block with SwiGLU
This question evaluates implementation and reasoning skills for Transformer internals, testing competency in multi-head self-attention, SwiGLU gated feed-forward layers, residual connections, and layer normalization within the Machine Learning / deep learning domain.
Coding & AlgorithmsTechnical Screen - GoogleMediumMachine Learning EngineerImplement substring search and weighted sampling
This question tests the ability to implement a fast substring matching algorithm and a data structure that supports weighted random sampling from a dynamic collection of items.
Coding & AlgorithmsTechnical ScreenString MatchingKMPProbability - GoogleMediumMachine Learning EngineerMinimize Fence Painting Operations
This problem tests your ability to use a greedy approach or dynamic programming to find the minimum number of strokes required to paint a fence of varying heights.
Coding & AlgorithmsTechnical ScreenGreedyStackArrays - HarveyMediumMachine Learning EngineerImplement a Spreadsheet With Formulas
This problem tests your ability to model cell dependencies using a directed graph, handle topological sorting for re-evaluation, and identify circular references.
Coding & AlgorithmsTechnical ScreenGraphsRecursionDFS