![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Algorithm
idragonkid
这个作者很懒,什么都没留下…
展开
-
BubbleSort
# coding:utf-8 def bubbleSort(seq): """ >>> bubbleSort([1]) [1] >>> bubbleSort([2, 1, 4, 3, 5, 6]) [1, 2, 3, 4, 5, 6] >>> bubbleSort([1, 3, 2, 4, 6, 5]) [1, 2, 3, 4, 5, 6]原创 2014-04-26 11:40:19 · 548 阅读 · 0 评论 -
QuickSort
# coding: utf-8 """ >>> seq = [1] ... quickSort(0, len(seq) - 1) ... print seq == [1] True >>> seq = [2, 1, 4, 3, 5, 6] ... quickSort(0, len(seq) - 1) ... seq == [1, 2, 3, 4, 5, 6] True >>> seq = [1原创 2014-04-26 21:00:50 · 492 阅读 · 0 评论