Divide Intervals Into Minimum Number of Groups | Leetcode 2406