Driver code
public static void main ( String [ ] args ) { int [ ] A = { 1 , 4 , 3 , 5 , 7 } ; int [ ] B = { 2 , 2 , 5 , 8 , 9 } ; int n = A . length ; if ( IsSorted ( A , B , n ) == true ) { System . out . println ( " True " ) ; } else { System . out . println ( " False " ) ; } } }