add \subsection{$k$-nearest neighbor} to algorithms