会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Crepes of Wrath
博客园
首页
新随笔
联系
管理
订阅
2014年11月12日
Quick Sort In-place Implementation
摘要: 在线运行PHPhttp://www.compileonline.com/execute_php_online.php 1 $a[$i] )37 {38 swap( $a[$n], $a[$i] );39 $i = $n;40 ...
阅读全文
posted @ 2014-11-12 19:02 crepesofwrath
阅读(359)
评论(0)
推荐(0)
编辑
2014年11月10日
Mediawiki.org的PHP编码约定
摘要: http://www.mediawiki.org/wiki/Manual:Coding_conventions/PHPassignment作为expression来用看起来像个错误(looks surprising)// Noif ( $a = foo() ) { bar();}// Yes$...
阅读全文
posted @ 2014-11-10 18:32 crepesofwrath
阅读(232)
评论(1)
推荐(0)
编辑
2014年11月9日
Quick Sort
摘要: 1
阅读全文
posted @ 2014-11-09 17:56 crepesofwrath
阅读(283)
评论(0)
推荐(0)
编辑
Insertion Sort
摘要: 1 0; $j--){22 if($a[$j]
阅读全文
posted @ 2014-11-09 17:35 crepesofwrath
阅读(198)
评论(0)
推荐(0)
编辑
Selection Sort
摘要: Red is current min. Yellow is sorted list. Blue is current item. 1 never happens, it means an ascending array already31 if($a[$j] > $a[$j...
阅读全文
posted @ 2014-11-09 16:12 crepesofwrath
阅读(193)
评论(0)
推荐(0)
编辑
Bubble Sort
摘要: 1 $a[$j+1]){30 swap($a[$j], $a[$j+1]);31 $n = 1;32 }33 }34 35 if($n == 0){ # no swap hap...
阅读全文
posted @ 2014-11-09 11:32 crepesofwrath
阅读(338)
评论(0)
推荐(0)
编辑
公告