← ALL NOTES
String

2483. Minimum Penalty for a Shop

A string customers of 'Y'/'N' describes hours: 'Y' had customers, 'N' didn't. If the shop closes at hour j, the penalty = the number of 'N' hours before j (open for nothing) plus the number of 'Y'…

Loading…