message-flow.com - Parked Domain | easyDNS

Description: This domain is parked with easyDNS.

Example domain paragraphs

Here is the problem. Let say you have a large CSV file that can not be opened completely in memory. Each line is a record that represents a star. The star record has a name and it's coordinates x, y and z. From this file you need to determine the 10 closest stars to a given star by the distance between the given star and the ones in the file using a function that will return the distance value as an double. How would you solve this problem?

Now that I have set up the question I am going to show you how I solved it.

To start off I am going to build the Star object. The star object has some important properties including X,Y,Z and Name that are defined in the question plus a property call DistanceToCompare. This property will hold the value of the distance between the star and the given star. To populate this value their is a method called CalculateDistanceToCompare which takes in the given star object as a parameter. This function follows the standard calculation for determining the distance between two points via thei