Driven Program
public static void main ( String [ ] args ) { int arr [ ] = { 1 , 2 , 5 , 3 , 4 , 6 } ; int n = arr . length ; String str = "01110" ; System . out . println ( possibleToSort ( arr , n , str ) ) ; } }