text: Function to print the sorted array if elements are swapped .
code: static void getSortedArray ( int [ ] arr1 , int [ ] arr2 , int n ) { if ( swapElement ( arr1 , arr2 , n ) ) { for ( int i = 0 ; i < n ; i ++ ) { Console . Write ( arr1 [ i ] + " ▁ " ) ; } } else { Console . Write ( " Not ▁ Possible " ) ; } }