Function that counts the minimum moves required to sort the array
function minOperationsUtil ( arr , n ) { let brr = new Array ( n ) ; for ( let i = 0 ; i < n ; i ++ ) brr [ i ] = arr [ i ] ; brr . sort ( ) ; let f = 0 ;