@ SuppressWarnings ( "unchecked" ) public static < T extends Comparable < ? super T > > void mergeSort ( T [ ] arr ) { /*if ( arr.length < 15 ) { insertionSort( arr ); return; }*/ T [ ] tmpArr = ( T [ ] ) new Comparable [ arr . length ] ; mergeSort ( arr , tmpArr , 0 , arr . length - 1 ) ; }
merge sort algorithm