随笔分类 -  Python

python自学笔记
摘要:一、排序思想 希尔排序思想请参见:https://www.cnblogs.com/luomeng/p/10592830.html二、python实现def shellSort(arr): """ python希尔排序 :param arr: 待排序列 step :步长值 """ step = len(arr) // 2 while step > ... 阅读全文
posted @ 2019-04-11 02:51 Lvan灬 阅读(727) 评论(0) 推荐(0)
摘要:一、排序思想 快速排序思想请参见:https://www.cnblogs.com/luomeng/p/10587492.html二、python实现def quickSort(arr, leftIndex, rightIndex): """ python实现快速排序 :param arr: 待排序列 :param leftIndex: 待排序列开始索引 :p... 阅读全文
posted @ 2019-04-10 02:43 Lvan灬 阅读(257) 评论(0) 推荐(0)
摘要:一、排序思想 二分(折半)查找思想请参见:https://www.cnblogs.com/luomeng/p/10585291.html 二、python实现 阅读全文
posted @ 2019-04-09 13:38 Lvan灬 阅读(366) 评论(0) 推荐(0)
摘要:一、排序思想 排序思想参见:https://www.cnblogs.com/luomeng/p/10583124.html二、python实现def InsertSort(arrs): """ 插入排序 :param arrs: 待排序列 index:有序序列尾元素下标 value:有序序列尾元素值 """ for i in range(1, l... 阅读全文
posted @ 2019-04-05 13:22 Lvan灬 阅读(364) 评论(0) 推荐(0)
摘要:一、排序思想 选择排序思想参见:https://www.cnblogs.com/luomeng/p/10581732.html 二、Python实现 阅读全文
posted @ 2019-04-05 01:10 Lvan灬 阅读(666) 评论(0) 推荐(0)
摘要:一、排序思想 排序思想参见:https://www.cnblogs.com/luomeng/p/10161794.html二、python实现def bubble_sort(nums): """ 冒泡排序 Python3 range() 函数返回的是一个可迭代对象(类型是对象),而不是列表类型, 所以打印的时候不会打印列表。 Python2 range() 函数返... 阅读全文
posted @ 2019-04-03 23:37 Lvan灬 阅读(441) 评论(0) 推荐(0)