Back to problems

Implement K-means and solve interval/frequency tasks

Algorithm · Amazon · Medium

Complete the following three tasks. Task 1 — K-means clustering (conceptual). Explain the K-means algorithm in detail: select initial centroids, assign each data point to its nearest centroid, then recompute each centroid as the mean of the points assigned to it, repeating until convergence. Outline how this would be implemented. No code submission is needed for this task. Task 2 — Merge overlapping intervals. You are given a collection of intervals, each represented as…

Checking your access…