Complexity std :: find_end as Big-O

How can I imagine the complexity of the std::find_end as a Big-O notation?

The complexity of std::find_end is defined as follows:

No more than (last2 - first2) * (last1 - first1 - (last2 - first2) + 1) applications of the corresponding predicate.

+7
source share
1 answer

This will be O(M*(NM)) , where N is the number of elements in sequence 1, and M is the number of elements in sequence 2.

+5
source

All Articles