bool sortbysec(const pair<int,int> &a,const pair<int,int> &b)
{
return (a.second < b.second);
}
sort(vect.begin(), vect.end(), sortbysec);
vector< pair <int, int> > vect;
int arr[] = {10, 17, 5, 70 };
int arr1[] = {30, 60, 20, 50};
int n = sizeof(arr)/sizeof(arr[0]);
for (int i=0; i<n; i++)
vect.push_back( make_pair(arr[i],arr1[i]));
what does return(a.second<b.second) mean? how is it sorting by the second element?