数据结构&算法
Carl_blog
将军赶路,不追小兔。
展开
-
Top10:数据结构-排序和搜索-二分查找-python
Top10:数据结构-排序和搜索-二分查找-python实现一:实现二: 实现一: """ @Time: 2020/9/1/001 10:57 @Author: Carl @File: binarySearchDemo @Software: PyCharm Professional Edition """ def binarySearch(alist, item): first = 0 last = len(alist) - 1 found = False w原创 2020-09-01 11:01:23 · 152 阅读 · 0 评论 -
Top9:数据结构-顺序查找-python
Top9:数据结构-顺序查找-python """ @Time: 2020/9/1/001 10:46 @Author: Carl @File: sequentialSearchDemo @Software: PyCharm Professional Edition """ def sequentialSearch(alist, item): pos = 0 found = False while pos < len(alist) and not found:原创 2020-09-01 10:50:08 · 115 阅读 · 0 评论