摘要: def interpolation_search(data,val): low=0 high=len(data)-1 print('查找过程中......') while low data[mid]: print('%d 介于中间值位置 %d[%3d] 和 %d[%3d] 之间,找右半边' \ %(v... 阅读全文
posted @ 2018-12-27 23:52 anobscureretreat 阅读(637) 评论(0) 推荐(0)
摘要: def bin_search(data,val): low=0 high=len(data)-1 while low data[mid]: print('%d 介于中间值位置 %d[%3d] 和 %d[%3d] 之间,找右半边' \ %(val,mid+1,data[mid],high+1,data[high... 阅读全文
posted @ 2018-12-27 23:35 anobscureretreat 阅读(231) 评论(0) 推荐(0)
摘要: import random val=0 data=[5,6,7,8,9] while val!=-1: find=0 val=int(input('请输入查找键值(1-9),输入-1离开:')) for i in data: if i==val: print('在第 %3d个位置找到键值 [%3d]' %(i+1,i)) ... 阅读全文
posted @ 2018-12-27 22:55 anobscureretreat 阅读(461) 评论(0) 推荐(0)
摘要: [root@bogon ~]# stat -c%s install.log 26593 阅读全文
posted @ 2018-12-27 12:24 anobscureretreat 阅读(263) 评论(0) 推荐(0)