Driver program to test above function
public static void main ( String [ ] args ) { int A [ ] = { 1 , 3 , 2 , 4 , 6 , 5 } ; int n = A . length ; if ( almostSort ( A , n ) ) System . out . print ( " Yes " ) ; else System . out . print ( " No " ) ; } }