5 clustering interview questions, asked at Microsoft, Amazon, Google and 3 more companies. Last asked Sep 2026.
+2
Implement k-means clusteringCodingImplement k-means from scratch: initialize k centroids, assign every point to its nearest centroid, move each centroid to the mean of its points, and repeat until the assignments…
Last asked Sep 2026
Group 3D points within a distance thresholdCodingGiven points in 3D and a distance threshold, group them so that two points closer than the threshold end up in the same group, directly or through a chain of close points. Return…
Last asked May 2026
Place K pickup points to minimize total L1 distanceCodingGiven the coordinates of N people, choose K shuttle pickup locations so that the sum of each person's Manhattan (L1) distance to their nearest pickup is as small as possible…
Design Google NewsSystem designGather articles from thousands of publishers, group stories about the same event, and show each reader a fresh, personalized front page.