Answers for "comparator pair cpp"

C++
0

comparator pair cpp

// Driver function to sort the vector elements
// by second element of pairs
bool sortbysec(const pair<int,int> &a,
              const pair<int,int> &b)
{
    return (a.second < b.second);
}
Posted by: Guest on August-12-2021

Browse Popular Code Answers by Language