会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Moving
执志若金,敢作敢为。 如果输了今生,绝不苛求来世!
博客园
首页
新随笔
联系
订阅
管理
2011年12月12日
选择排序,冒泡排序(python实现)
摘要: def bubbleSort(L): for j in range(len(L)): print L print j for i in range(len(L)-1): if L[i]>L[i+1]: temp=L[i+1] L[i+1]=L[i] L[i]=temp厉害点的冒泡排序def bubbleSort(L): sort=True while sort: print L sort=Fals...
阅读全文
posted @ 2011-12-12 23:37 wyixin
阅读(425)
评论(3)
推荐(0)
编辑
公告