This question evaluates understanding of clustering and metric-based optimization, focusing on L1 distance and interval covering in a one-dimensional setting and belongs to the Machine Learning and algorithms domain with a practical application focus on algorithm design and optimization.
You are given an array of n integers on a number line and an integer k (1 ≤ k ≤ n). Place k cluster centers on the real line to minimize the maximum L1 (absolute) distance between any point and its nearest center.
Return the optimal radius R* such that all points can be covered by k intervals of radius R* around the chosen centers, and no smaller radius suffices.
Login required