Minimum Number Of Swaps Required To Sort An Array
Given an array of n distinct elements, find the minimum number of swaps required to sort the array.
1 <= n <= 1000000 1 <= arr[i] <= 1000000000
First line contains an integer N . Second line has 2 space separated integers ai and bi.
Print in one line the minimum number of swaps required to sort the given array.
5 10 19 6 3 5