Work Schedules (for MTS2)
From Nutanix interviews: This coding interview problem asks you to generate all valid 7-day work schedules. Given weekly work_hours, a max day_hours, and a 7-character pattern with digits 0–8 and ? placeholders, output every schedule that meets the total and daily cap. Return the schedules as strings, sorted lexicographically. A common interview question on constraints.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
