Driver Code
$ A = array ( 1 , 2 , 5 , 3 , 4 , 6 ) ; $ B = array ( 0 , 1 , 1 , 1 , 0 ) ; $ n = count ( $ A ) ; if ( sortedAfterSwap ( $ A , $ B , $ n ) ) echo " A ▁ can ▁ be ▁ sorted STRNEWLINE " ; else echo " A ▁ can ▁ not ▁ be ▁ sorted STRNEWLINE " ; ? >