And what does that say? It says, let's assume I want to do k searches of a list. OK.
如果我们假定要在列表中做k次搜索,在线性的情况下,假定是一个未排序的情况。
I was in The British War Museum, the Imperial War Museum the other day, and I'd been there four or five times, and I went--and they have a thing where you can look up dead people.
我去过英国军事博物馆,有一天去帝国军事博物馆,我去过四五次了,我又去了,那有一个,东西你可以搜索阵亡人
In the linear case, meaning in the unsorted case what's the complexity of this? k times n, right? Order n to do the search, and I've got to do it k times, so this would be k times n.
复杂度是多少?k的n次方,对吧?,在序列n中做搜索,要做k次,所以是k的n次方次,如果先排序后搜索。
应用推荐