C++ Solution to Leetcode 1288. Remove Covered Intervals