The interesting part is solving the "closest pair problem" which is a part of the clustering algorithm. Hurts my head just thinking about it, god knows how someone came up with a solution like this.
https://www.geeksforgeeks.org/closest-pair-of-points-using-d...
n4r9|7 years ago
https://en.wikipedia.org/wiki/Single-linkage_clustering