Adding Daniel's KNN code

Very minor point, but the red character means that there's no newline at the end of the file... just hit enter after the last line to avoid.