Given one million points in a three dimensional space, this program prints the ‘k’ nearest points to a given point.
In this implementation, one million 3D points, a reference point with respect to which k-nearest neighbors are to be found and the ‘k’ value are randomly generated by the program. The algorithm is based on max-heap implementation.