question: private static double distance ( double [ ] p1 , double [ ] p2 ) { double sum = 0.0 ; for ( int i = 0 ; i < p1 . length ; i ++ ) { sum += Math . pow ( p2 [ i ] - p1 [ i ] , 2.0 ) ; } return Math . sqrt ( sum ) ; }
target:  Returns the Euclidean distance between two points.