gpt4 book ai didi

c++ - std::find_end 作为 Big-O 的复杂性

转载 作者:可可西里 更新时间:2023-11-01 18:37:07 26 4
gpt4 key购买 nike

如何将 std::find_end 算法的复杂性表示为大 O 表示法?

std::find_end的复杂度定义如下:

At most (last2 - first2) * (last1 - first1 - (last2 - first2) + 1) applications of the corresponding predicate.

最佳答案

会是O(M*(N-M)),其中N是序列1中的元素个数,M是序列2的元素个数。

关于c++ - std::find_end 作为 Big-O 的复杂性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13371509/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com