串列( 「有序串列(Ordered List Ordered List)或称为 )或称为 「线性串列( 「线性串列(Linear List Linear List)是一种元素 )是一种元素 间拥有顺序的集合,如下所示: 间拥有顺序的集合,如下所示: (a0, a1, a2, (a0, a1, a2, ……
基于4个网页-相关网页
So it's certainly at least linear in the length of the list. For each starting point, what do I do?
它至少是线性的计算列表的长度,每次到了循环开始的点?
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.
如果是一个未排序的列表,基本上我们就只能使用线性搜索了,通过遍历整个列表来查看。
Because if you did what I suggested with the list, the time to look up the key would be linear in the length of the list. You'd have to look at each element until you found the key.
字典是用一种很神奇的,叫做散列法的算法,来实现的,后面我们将,会学到一点关于。
应用推荐