- Pair of csv files: patients.csv and clinics.csv
- Containing address details of each patient and clinic respectively
- A csv file with number of rows equal to number of patients
- Each row indicates the nearest clinic to the corresponding patient
-
find geocode of each address
-
latitude and longitude of each address
-
use geocodes to find clinic nearest to each individual patient
-
based off travel/commute distance (and not the straight line distance)
P number of patients and C number of clinics
startup, update: O(1+2)
- (1) O((P + C)(geocode query))
- (2) O(match nearest clinic for each patient)
- brute force: O(PC)
- k-d tree: O(PlogC)