Driver progra to test above functions
$ arr = array ( 1 , 20 , 6 , 4 , 5 ) ; $ n = sizeof ( $ arr ) / sizeof ( $ arr [ 0 ] ) ; echo " Number ▁ of ▁ swaps ▁ is ▁ " . countSwaps ( $ arr , $ n ) ; return 0 ; ? >