PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Sealth

Implement one-cluster k-means

Last updated: Apr 22, 2026

Quick Overview

This question evaluates understanding of clustering algorithms and optimization of within-cluster squared error for the special case k = 1, along with the ability to implement a numerical solution in d-dimensional space.

  • easy
  • Sealth
  • Coding & Algorithms
  • Machine Learning Engineer

Implement one-cluster k-means

Company: Sealth

Role: Machine Learning Engineer

Category: Coding & Algorithms

Difficulty: easy

Interview Round: Onsite

Given n points in d-dimensional space, implement k-means clustering with squared Euclidean distance for the special case k = 1. Return the single centroid that minimizes the total within-cluster squared error over all points. The interviewer may also ask you to explain why this special case converges immediately without repeated reassignment steps.

Quick Answer: This question evaluates understanding of clustering algorithms and optimization of within-cluster squared error for the special case k = 1, along with the ability to implement a numerical solution in d-dimensional space.

Related Interview Questions

  • Simulate Threshold Grid Infection - Sealth (medium)
  • Decode Ambiguous Morse Messages - Sealth (medium)
Sealth logo
Sealth
Apr 12, 2026, 12:00 AM
Machine Learning Engineer
Onsite
Coding & Algorithms
1
0
Loading...

Given n points in d-dimensional space, implement k-means clustering with squared Euclidean distance for the special case k = 1. Return the single centroid that minimizes the total within-cluster squared error over all points. The interviewer may also ask you to explain why this special case converges immediately without repeated reassignment steps.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Sealth•More Machine Learning Engineer•Sealth Machine Learning Engineer•Sealth Coding & Algorithms•Machine Learning Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.