← Adobe Interview Insights

Adobe·Machine Learning Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Apr 2026

Summary

Adobe ML Engineer interview that came down to a single meaty coding question: implement K-Means from scratch. No libraries, full discussion of tradeoffs and edge cases. Felt more like a whiteboard research conversation than a typical LeetCode grind.

Questions Asked (1)

Q1

Implement K-Means clustering from scratch using only NumPy or plain lists. Your function should accept a set of 2D points, the number of clusters k, a max iteration count, and a convergence tolerance. Walk through centroid initialization, point assignment, centroid recomputation, and stopping conditions. Return both the cluster labels and final centroids. Also discuss time complexity, how you'd handle edge cases like empty clusters or ties, and how you'd pick k in practice.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This one took up the whole session.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem and outlining the K-Means algorithm steps, then implement it in a clean, modular function using NumPy. Walk through the code, explaining each part, and then discuss complexity, edge cases, and practical considerations for choosing k.

Pro tip: Demonstrate awareness of K-Means++ initialization and its impact on convergence, and mention that you'd use the elbow method or silhouette score to choose k in practice, showing you understand both theory and application.

1. Clarify requirements and outline algorithm

Confirm input/output format, constraints, and then verbally outline the K-Means steps: initialization, assignment, update, and convergence check.

2. Implement initialization and assignment

Code centroid initialization (e.g., random selection from points) and assign each point to the nearest centroid using Euclidean distance.

3. Implement centroid update and convergence check

Recompute centroids as the mean of assigned points, and check for convergence based on centroid movement or label changes within tolerance.

4. Handle edge cases and return results

Address empty clusters by reassigning or removing them, handle ties by consistent tie-breaking, and return labels and final centroids.

5. Discuss complexity and practical considerations

Analyze time complexity (O(n*k*d*i)), and discuss methods for choosing k (elbow, silhouette) and initialization strategies (K-Means++).

Key Points to Mention

  • Time complexity: O(n * k * d * i) where n is number of points, k clusters, d dimensions, i iterations.
  • Empty cluster handling: reassign to farthest point or reinitialize centroid.
  • Tie-breaking: deterministic rule (e.g., lowest index) for consistent results.
  • Convergence criteria: centroid movement below tolerance or max iterations reached.
  • Choosing k: elbow method, silhouette score, domain knowledge.
  • Initialization: random vs. K-Means++ for better convergence.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.