Divide Intervals Into Minimum Number of Groups — CaffeCode