text: Driver code
code: $ a = array ( 1 , 3 , 2 ) ; $ b = array ( 3 , 1 , 2 ) ; $ n = sizeof ( $ a ) ; $ m = sizeof ( $ b ) ; if ( arePermutations ( $ a , $ b , $ n , $ m ) ) echo " Yes " . " STRNEWLINE " ; else echo " No " . " STRNEWLINE " ;