This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
/** | |
* Calculate the detour distance between two different rides. Given four | |
* latitude / longitude pairs, where driver one is traveling from point A to | |
* point B and driver two is traveling from point C to point D, write a function | |
* (in your language of choice) to calculate the shorter of the detour distances |