Daily bit(e) of C++ | std::includes
Daily bit(e) of C++ #186, The O(n) subrange check for sorted ranges: std::includes.
The std::includes algorithm determines whether the second range is a (not necessarily contiguous) subsequence of the first range.
Both ranges must be sorted with respect to the same strict weak ordering. However, because of the sorted requirement, the algorithm operates in O(n).