C ++ program to find minimum number of swaps required to sort an array
#include <bits/stdc++.h> NEW_LINE using namespace std ; void swap ( vector < int > & arr , int i , int j ) { int temp = arr [ i ] ; arr [ i ] = arr [ j ] ; arr [ j ] = temp ; }