/Demo_SortSearch_Python

python3的常用排序算法(10个)和常用查找算法(8个)

Primary LanguagePython

1、Python语言的应用 之 Demo_SortSearch_Python

10个常用排序算法和8个常用查找算法

2、更新信息

开发者:沙振宇(沙师弟专栏)
创建时间:2019-12-2
最后一次更新时间:2019-12-5

CSDN博客地址——十个常用排序算法——python3实现(顺便讲了全部的排序算法分类):
https://shazhenyu.blog.csdn.net/article/details/91395700
CSDN博客地址——八个常用查找算法——python3实现:
https://shazhenyu.blog.csdn.net/article/details/90645537

3、排序查找算法

3.1、排序算法

3.1.1、冒泡排序——交换类排序
3.1.2、快速排序——交换类排序
3.1.3、选择排序——选择类排序
3.1.4、堆排序——选择类排序
3.1.5、插入排序——插入类排序
3.1.6、希尔排序——插入类排序
3.1.7、归并排序——归并类排序
3.1.8、计数排序——分布类排序
3.1.9、基数排序——分布类排序
3.1.10、桶排序——分布类排序

3.2、查找算法

3.2.1、顺序查找
3.2.2、二分查找
3.2.3、分块查找
3.2.4、斐波那契查找
3.2.5、哈希查找
3.2.6、插值查找
3.2.7、B树查找
3.2.8、二叉树查找(BST)

4、结果

Sorting...
————————————————————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is bubble sort
——————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is bucket sort
——————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is counting sort
——————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is heap sort
——————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is insertion sort
——————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is merge sort
——————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is quick sort
——————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is radix sort
——————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is selection sort
——————————————
[1, 5, 8, 123, 22, 54, 7, 99, 300, 222] is source list
[1, 5, 7, 8, 22, 54, 99, 123, 222, 300] is shell sort
————————————————————————————
Searching...
————————————————————————————
[1, 5, 7, 8, 22, 54, 99, 123, 200, 222, 444] is source list, 54 is key
bTree search: True
——————————————
[1, 5, 7, 8, 22, 54, 99, 123, 200, 222, 444] is source list, 54 is key
binary search: True
——————————————
[1, 5, 7, 8, 22, 54, 99, 123, 200, 222, 444] is source list, 54 is key
binary tree search: True
——————————————
[1, 5, 7, 8, 22, 54, 99, 123, 200, 222, 444] is source list, 54 is key
block search: True
——————————————
[1, 5, 7, 8, 22, 54, 99, 123, 200, 222, 444] is source list, 54 is key
fibonacci search: True
——————————————
[1, 5, 7, 8, 22, 54, 99, 123, 200, 222, 444] is source list, 54 is key
hash search: True
——————————————
[1, 5, 7, 8, 22, 54, 99, 123, 200, 222, 444] is source list, 54 is key
interpolation search: True
——————————————
[1, 5, 7, 8, 22, 54, 99, 123, 200, 222, 444] is source list, 54 is key
sequential search: True
————————————————————————————

5、排序算法总纲

image