Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

maximum value in map in c++

auto x = std::max_element(m.begin(), m.end(),
    [](const pair<int, int>& p1, const pair<int, int>& p2) {
        return p1.second < p2.second; });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #maximum #map
ADD COMMENT
Topic
Name
2+7 =