An example of defining a custom comparison for a std::set. A C++ solution for Leetcode 729. My Calendar I.
Two approaches for solving Leetcode Challenge 80. Remove Duplicates from Sorted Array II. The key is to either erase duplicates beyond two occurrences while preserving order or reassign valid elements (up to two of each) to the first k indexes of nums.