Kaiser Permanente interview question

Explain and Implement KNN algorithm without using any library.