Algorithm · Ramp · Medium
Problem: Maximum Earnings After Converting Days Off to Workdays An employee has a planned schedule covering the next n days. This schedule is given as a binary string s of length n: s[i] = '1' indicates that day i is initially a workday. s[i] = '0' indicates that day i is initially a day off. The employee receives pay dollars for every workday. For any workday whose immediately preceding day is also a workday, the employee earns an additional bonus dollars for that day. The…
Checking your access…