Untested yet complete impl of KNN Algo