Driver Code
public static void main ( String [ ] args ) { int arr [ ] = { 1 , 3 , 5 , 2 } ; int N = arr . length ; if ( check ( arr , N ) ) System . out . print ( " YES " ) ; else System . out . print ( " NO " ) ; } }