</>OfferRetriever
DashboardDiscuss
NEW

Summer Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

14

:

03

:

47

:

32

Get this deal
Back to Dashboard

[OA] Work Schedule Generator

Medium

A factory uses a shift planning system to schedule worker hours across a 7-day week. Each day is represented as a single character in a pattern string of length 7. A character is either a digit '0' through '8' (the number of hours worked that day) or '?' (an unscheduled day).

Given a target number of weekly hours targetHours, a maximum hours per shift maxShiftHours (between 0 and 8 inclusive), and a 7-character pattern string, replace each '?' with a digit from '0' to maxShiftHours (inclusive) such that the sum of all 7 digits equals targetHours. Return all valid completed patterns in ascending lexicographic order. ...

OfferRetriever

Master technical interviews with real questions from top companies. Build your confidence and career.

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCode
LEGAL
POPULAR COMPANIES
GoogleMetaAmazonMicrosoftNetflixStripeUberTikTokBrowse all companies →

© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.