Function to generate the permutation of the first N natural numbers having sum of absolute difference between element and indices as minimum
#include <iostream> NEW_LINE using namespace std ; void swap ( int & a , int & b ) { int temp = a ; a = b ; b = temp ; } void findPermutation ( int N ) {