摘要: def heapsort(lst): n = len(lst) start = (n-2)/2 for i in range(start,-1,-1): BiTree(lst,i,n-1) for i in range(n-1,0,-1): lst[i],lst[0]=lst[0],lst[i] BiTree(ls... 阅读全文
posted @ 2017-12-08 07:43 YWU 阅读(132) 评论(0) 推荐(0)
摘要: import time # -----------Bubble sort-------------------- s = time.clock() a = [4, 2, 5, 6, 1, 3, 7, 12, 34, 2, 234,5, 13, 2] n = len(a) for i in range(n-1, 0 , -1): for j in range(i): ... 阅读全文
posted @ 2017-12-08 07:41 YWU 阅读(156) 评论(0) 推荐(0)
摘要: Python安装 1)环境变量中的“Path”行添加“”python安装在win下面的路径“”,本人python安装在C:\Python27。 ps:记住,路径用分号 “;” 隔开! 2)cmd 里打开python即可进入平台。要退出输入quit(), 然后回车即可。 ps: 第一下没成功,重启cm 阅读全文
posted @ 2017-08-11 16:51 YWU 阅读(99) 评论(0) 推荐(0)