Explain how k-Nearest Neighbors (k-NN) can be adapted for anomaly detection.
Role: Data Scientist
Category: Statistics & Math
Difficulty: medium
Interview Round: Other
Overview: Asks how the k-nearest neighbors method can be turned into an unsupervised anomaly detector. Tests whether you can build a distance-based outlier score, choose k and a threshold, and recognize where one global distance cutoff fails on data with clusters of different density.