You are given a customer visit log represented by a string customers of length customers[i] indicates whether a customer arrived:
'Y' indicates that a customer arrived at the
'N' indicates that no customer arrived at the
The shop can be closed at any hour
For each hour customers[i] == 'N'), the penalty increases by
For each hour customers[i] == 'Y'), the penalty increases by
Return the earliest closing hour
Constraints:
customers.length
customers consists only of characters 'Y' and 'N'.
You are given a customer visit log represented by a string customers of length customers[i] indicates whether a customer arrived:
'Y' indicates that a customer arrived at the
'N' indicates that no customer arrived at the
The shop can be closed at any hour
For each hour customers[i] == 'N'), the penalty increases by
For each hour customers[i] == 'Y'), the penalty increases by
Return the earliest closing hour
Constraints:
customers.length
customers consists only of characters 'Y' and 'N'.