1: 8, 7, 9, 22, 5, 13, 31 = 4 swaps
2: 7, 8, 9, 5, 13, 22, 31 = 3 swaps
3: 7, 8, 5, 9, 13, 22, 31 = 1 swap
4: 7, 5, 8, 9, 13, 22, 31 = 1 swap
5: 5, 7, 8, 9, 13, 22, 31 = 1 swap
Total 10 swaps are required to sort the array.
Hence Option(D) is the correct answer.