Pinterest interview question

Implementation K means and KNN