Python算法
程序员文章站
2022-04-21 14:21:21
...
''' Created on 2013-8-23 @author: codegeek ''' def bubble_sort(seq): for i in range(len(seq)): for j in range(i,len(seq)): if seq[j] seq[j]: position = j if position != i: tmp = seq[position] seq[position] = seq[i] seq[i] = tmp def insertion_sort(seq): if len(seq) > 1: for i in range(1,len(seq)): while i > 0 and seq[i]
上一篇: apache不能解析php文件
下一篇: python分数怎么表示什么