sort


LeetCode Sort Colors Solution Explained - Java 25,919 views Sep 10, 2019 648 Dislike Share Save Nick White 281K subscribers Preparing For Your Coding Interviews?



5 Answers. Sorted by: 122. std::sort (object.begin (), object.end (), pred ()); where, pred () is a function object defining the order on objects of myclass. Alternatively, you can define myclass::operator<. For example, you can pass a lambda: