I know it's gonna take me a lot of work on the order of N squared steps to sort these things.
要对它们排序就要进行大量的工作,大概需要N平方步。
It's going to weigh too much, we don't need to look at it. But it'll still be order 2 to the n.
我们没必要去看它,但是它还是要遵循2到n的顺序。
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次方次,如果先排序后搜索。
应用推荐