Before revision: Given a set S of n d-dimensional points  , the k-nearest neighbors ( KNN) is the problem of quickly finding k points in S that are nearest to a query point q.
After revision: Given a set S of n d-dimensional points and a d-dimensional query q , the k-nearest neighbors ( KNN) is the problem of quickly finding k points in S that are nearest to a query point q.