void function ( String [ ] arg0 ) { String [ ] loc0 = StdIn . readAllStrings ( ) ; Quick . sort ( loc0 ) ; show ( loc0 ) ; StdRandom . shuffle ( loc0 ) ; StdOut . println ( ) ; for ( int loc1 = 0 ; loc1 < loc0 . length ; loc1 ++ ) { String loc2 = ( String ) Quick . select ( loc0 , loc1 ) ; StdOut . println ( loc2 ) ; } }
reads in a sequence of strings from standard input ; quicksorts them ; and prints them to standard output in ascending order . shuffles the array and then prints the strings again to standard output , but this time , using the select method . concode_field_sep PlaceHolder placeHolder concode_field_sep int partition concode_elem_sep Comparable select concode_elem_sep void exch concode_elem_sep void show concode_elem_sep void sort concode_elem_sep void sort concode_elem_sep boolean less concode_elem_sep boolean isSorted concode_elem_sep boolean isSorted