Pergunta de entrevista da empresa IBM

How does the KNN algorithm work?