Check out example codes for "what is time complexity of min_element()". It will help you in understanding the concepts better.

Code Example 1

So, according to the link here: 
the max_element function is O(n),\
beacuase it touches at least every bucket of array
apparently for all STL containers.

Learn ReactJs, React Native from