Python數據結構——對有序表二分查找

list= [1, 5, 6, 9, 10, 51, 62, 65, 70]python 查找5時:code  [1, 5, 6, 9, 10, 51, 62, 65, 70]        low=0    high=9    mid=(0+8)//2=4    list[mid]=list[4]=10orm 5<10:                                     
相關文章
相關標籤/搜索