@ SuppressWarnings ( "unchecked" ) private void fixupMin ( int k ) { K key = array [ k ] ; int gp = k / 4 ; while ( gp > 0 && ( ( Comparable < ? super K > ) array [ gp ] ) . compareTo ( key ) > 0 ) { array [ k ] = array [ gp ] ; k = gp ; gp = k / 4 ; } array [ k ] = key ; }
Upwards fix starting from a particular element at a minimum level