If MP [ V [ j ] ] is 0 and V [ j ] is less than or equal to arr [ i ]
if ( MP . containsKey ( V . get ( j ) ) == false && V . get ( j ) <= arr [ i ] ) { arr [ i ] -= V . get ( j ) ; MP . put ( V . get ( j ) , 1 ) ; } }