好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

python实现冒泡排序

python算法 - python实现冒泡排序

test_methods = [test_sorted, test_bubble_sort]

for test in test_methods:

name = test.__name__ # test.func_name

t = timeit.Timer(name + '()', 'from __main__ import ' + name)

print(name + ' takes time : %f' % t.timeit(1))

查看更多关于python实现冒泡排序的详细内容...

  阅读:42次