Question: Python3 You just got a new job where you have to work exactly as many hours as you are told each week, working no more

Python3

Python3 You just got a new job where you have to work

You just got a new job where you have to work exactly as many hours as you are told each week, working no more than a daily maximum number of hours per day.Some of the days, they tell you how many hours you will work. You get to choose the remainder of your schedule, within the limits A completed schedule consists of exactly 7 digits in the range 0 to 8 representing each day's hours to be worked. You will get a pattern string similar to the schedule, but with some of the digits replaced by a question mark, ?, (ascii 63 decimal). Given a maximum number of hours you can work in a day, replace the question marks with digits so that the sum of the scheduled hours is exactly the hours you must work in a week. Return a string array with all possible schedules you can create, ordered lexicographically. For example, your partial schedule, pattern -08?2840, your required hours, work hours-24, and you can only work, at most, day_hours 4 hours per day during the two days in question. You have two days on which you must work 24-20 4 more hours for the week. All of your possible schedules are listed below: 0804840 9813840 0822846 831840 9840840 Function Description Complete the function findSchedules in the editor below. The function must return an array of strings that represents all possible valid schedules. The strings must be ordered lexicographically findSchedules has the following parameter(s) work hours: an integer that represents the hours you must work in the week day hours: an integer that represents the maximum hours you may work in a day pattern: a string that represents the partially completed schedule

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!