摘要: <?php//冒泡排序函数//本函数使用引用是为了避免不必要的内存消耗function &bubble(&$arr){ $count=count($arr); if($count>1){ for($i=0;$i<$count;$i++){ for($j=$count-1;$j>=$i;$j--){ if($arr[$j-1]>$arr[$j]){ $temp=$arr[$j-1]; $arr[$j-1]=$arr[$j]; ... 阅读全文
posted @ 2013-03-14 23:21 hoho,SalesForce 阅读(280) 评论(0) 推荐(0) 编辑