Maximize watched duration under consecutive-sum limit | ByteDance Interview Question