Increment the count of del [ i ]
if ( mp . has ( del [ i ] ) ) { mp . set ( del [ i ] , mp . get ( del [ i ] ) + 1 ) ; } else { mp . set ( del [ i ] , 1 ) ; } } let heap = [ ] ; for ( let i = 0 ; i < m ; ++ i ) {