2020年7月25日
摘要: 快速排序 才发现自己配置好差,最坏情况10000就堆栈溢出了。。。。。 # coding: utf-8 import random import sys sys.setrecursionlimit(100000000) def quick_sort(li, left, right): if left 阅读全文
posted @ 2020-07-25 20:29 Bethuel 阅读(83) 评论(0) 推荐(0)
摘要: 跟随视频学习了一些常见的排序,把自己第二天能理解的记录下来,万一以后忘记了呢? def linear_search(li, target): """ 线性查找 """ for ind, tar in enumerate(li): if tar == target: return ind else: 阅读全文
posted @ 2020-07-25 18:40 Bethuel 阅读(97) 评论(0) 推荐(0)