Driver code
public static void main ( String [ ] args ) { int a [ ] = { 15 , 1 , 2 , 17 , 6 } ; int b [ ] = { 1 , 1 , 0 , 1 , 1 } ; int n = a . length ; boolean res = sorting_possible ( a , b , n ) ; if ( res ) System . out . print ( " Yes " ) ; else System . out . print ( " No " ) ; } }