question: static String calculateNthPercentile ( List < String > values , int n ) { String [ ] valuesArr = new String [ values . size ( ) ] ; valuesArr = values . toArray ( valuesArr ) ; Arrays . sort ( valuesArr ) ; int ordinalRank = ( int ) Math . ceil ( n * values . size ( ) / 100.0 ) ; return valuesArr [ ordinalRank - 1 ] ; }
target:  Calculates nth percentile of a set of values using the Nearest Neighbor Method.