Order to find the input number can be sort good, also can be not sort number, and binary search can only input number can be sorted, sequential search: to find the number of data and written in turn, if you can find, is to find success, or failure, binary search: within the number of already sorted (orderly) search, but not every data in turn compared with pending investigation number, but the key and, in the middle position of the element search range comparison, figure 1) : sequential search. Figure (2) : binary search,
CodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html