未排序的列表可以包含任何想要的数据。
而未排序的集显示如下。
该操作的任务是在一个未排序的元素集合中查找特定的元素。
Its job is to find a particular element in an unsorted collection of elements.
If it was an unordered list, we were basically stuck with linear search. Got to walk through the whole list to see if the thing is there.
如果是一个未排序的列表,基本上我们就只能使用线性搜索了,通过遍历整个列表来查看。
And what does that say? It says, let's assume I want to do k searches of a list. OK.
如果我们假定要在列表中做k次搜索,在线性的情况下,假定是一个未排序的情况。
That does not assume I'm running a search it wants, which one's better?
哪一种更好呢?,未排序的,你们已经考虑到我想说的了?
应用推荐