comparator pair cpp

Solutions on MaxInterview for comparator pair cpp by the best coders in the world

showing results for - "comparator pair cpp"
Lilly
18 Aug 2018
1
2// Driver function to sort the vector elements
3// by second element of pairs
4bool sortbysec(const pair<int,int> &a,
5              const pair<int,int> &b)
6{
7    return (a.second < b.second);
8}
9