nearest neighbor algorithm 3830353