Suppose the list of pairs <(1, 3),(3, 2), (2, 4)> and i want to result as <(1, 3), (2, 4), (3, 2)>. How can i implement it using some STL in C++?
Also sorting with respect to second element of the pair? like: <(3, 2), (1, 3), (2, 4)> !
Suppose the list of pairs <(1, 3),(3, 2), (2, 4)> and i want to result as <(1, 3), (2, 4), (3, 2)>. How can i implement it using some STL in C++?
Also sorting with respect to second element of the pair? like: <(3, 2), (1, 3), (2, 4)> !