... (Data Structure) 阵列与链结串列 (Array and Linked List) 堆叠与伫列 (Stack and Queue) 搜寻与排序 (Search and Sort) 结业考试 (Final Exam) 评分标准 期末考试 35% 最后一次上课举行, Open Book!
基于16个网页-相关网页
A personal name is also rarely an atomic token. As an example, sometimes you may want to search or sort by a forename and sometimes by a surname.
个人姓名也很少作为单位标记。例如,有时您可能希望根据名称进行搜索或排序,有时则希望根据姓氏进行搜索或排序。
This section focuses on the implementation details of the features provided in this customized search center: search, sort, categorize, and filter.
这一节关注定制搜索中心提供的特性的实现细节:搜索、排序、分类和筛选。
I wanted to make an assumption that the data in my application was just values from a table. I wanted my data model to know how to search, sort, traverse and modify that data.
假定我的应用程序中的数据都来自于数据库表中存储的各种值,我想让数据模型知道怎样对数据进行查找、排序、遍历和修改。
So this is a nice little search-- sorry, a nice little sort algorithm . And in fact, it's relying on something that we're going to come back to, called the loop invariant.
恩,这是一个很棒的小搜索,抱歉,和很棒的小排序算法,事实上,它依赖于一些我们要回顾的东西,被称作循环不变量。
I could still do the linear case, which is order n or I could say, look, take the list, let's sort it and then search it. But in that case we said well to sort it was going to take n log n time, assuming I can do that.
我仍然可以做O的线性搜索,或者也可以以这个列表为例,我们先将其进行排序,然后再进行查找,但是在这种情况下,要花费n,log,n的时间去对其进行排序。
On the other hand, if I want to sort it first, OK, if I want to do sort and search, I want to sort it, it's going to take n log n time to sort it, and having done that, then I can search it in log n time.
我先排序,好的,如果我想排序再搜索,我要排序,这需要花n,log,n时间排序,然后做完了,我们能花log,n时间搜索,啊,哪一种更好呢?恩,呵呵。
应用推荐