Maximize Income by Converting Rest Days

You are given a binary string schedule of length n:

  • schedule[i] = '1' means day i is originally a workday.
  • schedule[i] = '0' means day i is originally a rest day.

Working on a day ea...

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: