NVIDIA interview question

Implement K-means clustering in C++.