Increment the count of del [ i ]
if ( mp . containsKey ( del [ i ] ) ) { mp . put ( del [ i ] , mp . get ( del [ i ] ) + 1 ) ; } else { mp . put ( del [ i ] , 1 ) ; } } Vector < Integer > heap = new Vector < Integer > ( ) ; for ( int i = 0 ; i < m ; ++ i ) {