how to find the max eement in a vector in c++ code example
Example 1: maximum in vector
*max_element(a.begin(), a.end());
Example 2: max of a vector c++
cout<<*max_element(a.begin(), a.end())<<endl;
Example 3: max element in vector c++
auto max = *max_element(vector.begin(), vector.end());