Driver Code
$ arr1 = array ( 3 , 5 , 2 , 5 , 2 ) ; $ arr2 = array ( 2 , 3 , 5 , 5 , 2 ) ; $ n = count ( $ arr1 ) ; $ m = count ( $ arr2 ) ; if ( areEqual ( $ arr1 , $ arr2 , $ n , $ m ) ) echo " Yes " ; else echo " No " ; ? >