导航

2020年11月9日

摘要: <?php function bubble_sort(&$arr){ $count = count($arr); for($i=0;$i<$count-1;$i++){ for($j=$i+1;$j<$count;$j++){ if($arr[$j]<$arr[$i]){ $arr[$i] = $a 阅读全文

posted @ 2020-11-09 19:58 玻璃星 阅读(54) 评论(0) 推荐(0) 编辑

摘要: <?php function selection_sort(&$arr){ $count = count($arr); for($i=0;$i<$count-1;$i++){ $temp = $i; for($j=$i+1;$j<$count;$j++){ if($arr[$j]<$arr[$tem 阅读全文

posted @ 2020-11-09 19:32 玻璃星 阅读(55) 评论(0) 推荐(0) 编辑

摘要: <?php function get_file_list($path){ $file_list = scandir($path); foreach($file_list as $v){ //防止无限循环,. ..在windwo操作系统中代表当前文件夹和上级文件夹 if($v '.'||$v '..' 阅读全文

posted @ 2020-11-09 11:38 玻璃星 阅读(70) 评论(0) 推荐(0) 编辑

摘要: 1.冒泡排序 2.选择排序 3.插入排序 4.希尔排序 5.归并排序 6.快速排序 阅读全文

posted @ 2020-11-09 10:39 玻璃星 阅读(101) 评论(0) 推荐(0) 编辑