Pinterest interview question

Implement K Nearest Neighbors algorithm