Maximum Earnings After Converting Days Off

Given a work schedule string schedule for n days:

  • schedule[i] = '1' means the employee works on day i.
  • schedule[i] = '0' means the employee is off on day i.
  • Each working day earns a...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: