PHP 冒泡算法

没什么用,写了玩玩的。 function bubble_sort(array $items): array { for ($i = 0; $i < count($items); $i++) { for ($j = $i + 1; $j < count($items); $j++) { if ($items[$i] > $items[$j]) …