Sort a vector of pairs on the basis of second element
Answers
Answered by
0
A pair is a container which stores twovalues mapped to each other, and avector containing multiple number of such pairs is called a vector of pairs. Case 1 : Sorting the vector elementson the basis of first element of pairs in ascending order. This type of sortingcan be achieved using simple “ sort() ” function.
Similar questions