add k-nearest-neighbor solution