Microsoft Interview Question

Find the number of swaps required to sort the array