2015年5月9日

python Quicksort demo

摘要: __author__ = 'student' ''' quicksort step 1, choose one pivot, such as pivot=la[0] step 2, scan the data from right side, find data less than pivot, then swap this with pivot pivot=1 [4] 5 7 3 20 9 ... 阅读全文

posted @ 2015-05-09 13:42 tneduts 阅读(526) 评论(0) 推荐(0) 编辑

Python HeapSort

摘要: __author__ = 'student' print 'hello world hello python' ''' heap sort root leftchild 2n+1 rightchild 2n+2 compare them and get the maxnode step by step think way one step write the perfect program i... 阅读全文

posted @ 2015-05-09 11:39 tneduts 阅读(749) 评论(0) 推荐(0) 编辑

导航