Check out example codes for "max and min of vector c++". It will help you in understanding the concepts better.

Code Example 1

*min_element(a.begin(), a.end());

Code Example 2

auto it = max_element(std::begin(cloud), std::end(cloud)); // c++11

Code Example 3

min_element(a.begin(), a.end()); //a is the array max_element(a.begin(), a.end());

Learn ReactJs, React Native from akashmittal.com