hot*_*ing 7 c++ algorithm complexity-theory
如何将std::find_end算法的复杂性表示为Big-O表示法?
std::find_end
复杂性std::find_end定义如下:
在大多数(last2 - first2) * (last1 - first1 - (last2 - first2) + 1) 相应谓词的应用程序中.
(last2 - first2) * (last1 - first1 - (last2 - first2) + 1)
das*_*ght 5
这将是O(M*(N-M)),其中N是该序列中1元件的数量,并且M为序列2中的元素的数量.
O(M*(N-M))
N
M
归档时间:
13 年 前
查看次数:
256 次
最近记录: