adding knn hw

Because R operations are vectorized, you can actually simplify the line to something like this:
return(sqrt(sum((x1-y2)^2)))