Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

how to sort the co-ordinates (x, y) with respect to x? (c++ stl)

$
0
0

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)> !


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>