Finding min and max values in a C++ standard container

Find min max element in c++ containers

Finding the minimum and maximum values is one of the first topics for software developers.

In C++, we can call the functions min_element() and max_element() to find the elements having respectively the lowest or the highest value in a standard container. These functions belong to the standard std::algorithm library.

Read more