Merge Sort

<?php $arr = array( 6,1,3,7,5,2,3,4,45,5,4,75,8,6,78,7980890,2,4,2,432,5,34,5634,34,5); echo “<br>”.implode(‘,’,$arr).”<br>”; $arr=mergesort($arr); echo implode(‘,’,$arr); function mergesort($numlist) { if(count($numlist) == 1 ) return $numlist; $mid = count($numlist) / 2; $left = array_slice($numlist, 0, $mid); $right = array_slice($numlist, $mid); $left = mergesort($left); $right = mergesort($right); return…