Maximize Earnings by Converting Days Off

An employee plans a work schedule for the next n days. You are given a binary string schedule of length n:

  • schedule[i] = '1' means the employee is originally scheduled to work on day i. -...

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: