question: public static double [ ] minmax ( List < Double > values ) { if ( values . size ( ) == 0 ) { return new double [ 2 ] ; } double min = values . get ( 0 ) ; double max = min ; int length = values . size ( ) ; for ( int i = 1 ; i < length ; i ++ ) { double value = values . get ( i ) ; min = Math . min ( min , value ) ; max = Math . max ( max , value ) ; } return new double [ ] { min , max } ; }
target:  Calculate the minimum and maximum values out of a list of doubles.