Company: Rippling_4sep
Difficulty: medium
Maximize Earnings Problem Description In a company, an employee receives a fixed amount, fixedPay dollars, each day they work. They also receive a bonus, bonus dollars, on a workday if they worked the day before. The employee is planning their work schedule for n days. Their schedule is given as a binary string schedule where '1' is a workday, and '0' is not. The employee can change up to k days off ('0') to workdays ('1'). Find the maximum earnings the employee can get after changing at most k days from '0' to '1'. Complete the function getMaxEarnings in the editor with the following parameters: string schedule : initial work schedule int k : the maximum number of extra days the employee can work int fixedPay : the fixed pay for each workday int bonus : the bonus if they also worked the previous day The function should return a long representing the maximum earnings possible. Examples Example 1: Input: schedule = "10100", k = 2, fixedPay = 1, bonus = 2 Output: 10 Explanation: The init