当前位置 : 主页 > 网络编程 > PHP >

bubbleSort.php

来源:互联网 收集:自由互联 发布时间:2021-06-28
bubbleSort.php $numbers[$j + 1]) { $temp = $numbers[$j]; $numbers[$j] = $numbers[$j + 1]; $numbers[$j + 1] = $temp; } } } return $numbers;} $num = array(20, 40, 60, 80, 30, 70, 90, 10, 50, 0);var_dump(bubbleSort($num));
bubbleSort.php
  $numbers[$j + 1]) {
                $temp = $numbers[$j];
                $numbers[$j] = $numbers[$j + 1];
                $numbers[$j + 1] = $temp;
            }
        }
    }
 
    return $numbers;
}
 
$num = array(20, 40, 60, 80, 30, 70, 90, 10, 50, 0);
var_dump(bubbleSort($num));
上一篇:idcardHelper.php
下一篇:Excel.class.php
网友评论