Far from it. It's not about saying, "Well I'm depressed. There's nothing I can do about it.
远远不是那样,不是说,“我很抑郁,这是毫无办法的事。
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的时间去对其进行排序。
应用推荐