Amazon interview question

program k-nearest neighbour from draft