Can anyone help?

Using statistic order query algorithm we need to find the closest stores to a nearby query point. We need to save location data (Store ID, addresses, latitude, and longitude) in a arraylist and implement Rand-Select() and Rand-Partition(). We will also have a data file of queries and with each query we need to compute the distance of the query point to each of the different stores using the Haversine Formula. Then use the order statistic query to find the farthest store from the query that we care about. For example, if we want to report 30 stores, you should search for the 30th closest store to the query point.
Now that you know the 30th closest store to the query, you can then find all of the other stores that are at least this close to the query. Sort them in increasing distance from the query point and print them. I'm not sure how to implement this problem using the random algorithms needed.

Comments (1)