Driver Code
public static void Main ( ) { int [ ] A = { 1 , 2 , 5 , 3 , 4 , 6 } ; int [ ] B = { 0 , 1 , 1 , 1 , 0 } ; int n = A . Length ; if ( sortedAfterSwap ( A , B , n ) == 0 ) Console . WriteLine ( " A ▁ can ▁ be ▁ sorted " ) ; else Console . WriteLine ( " A ▁ can ▁ not ▁ be ▁ sorted " ) ; } }