Done. All right? The basic, that primary search, because it looks at the first element, says it's smaller than everything else, I'm done.
以及其他的元素,检索完成,让我试试二分法呢?,可能会用更长的时间,请注意这里的输出。
Again. Basic premise of binary search, or at least we set it up was, imagine I have a sorted list of elements. We get, in a second, to how we're going to get them sorted, and I want to know, is a particular element in that list..
好,二分查找的基本前提,或者是我们建立二分查找的基础,我们已经有了一个排好序的元素列表,我们就需要知道如何来快速的排序,如何从列表中找到特定的元素。
OK. That's the basic idea of binary search.
好了,这就是二分查找的基本思想。
应用推荐