kNN sorted check