How can I imagine the complexity of the std::find_end as a Big-O notation?
std::find_end
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.
(last2 - first2) * (last1 - first1 - (last2 - first2) + 1)
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.
O(M*(NM))
N
M