python快速查找算法应用实例

上传:hzxhkj 浏览: 16 推荐: 0 文件:PDF 大小:32.43KB 上传时间:2020-12-31 07:19:37 版权申诉
本文实例讲述了Python快速查找算法的应用,分享给大家供大家参考。 具体实现方法如下: import random def partition(list_object,start,end): random_choice = start #random.choice(range(start,end+1)) #把这里的start改成random()效率会更高些 x = list_object[random_choice] i = start j = end while True: while list_object[i] < x and i <
上传资源
用户评论