Driver Code
public static void main ( String [ ] args ) { int arr [ ] = { 1 , 4 , 3 , 2 } ; int n = arr . length ; if ( checkSorted ( n , arr ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }