Strings
Dated Jul 21, 2024; last modified on Sun, 21 Jul 2024
Dated Jul 21, 2024; last modified on Sun, 21 Jul 2024
Random Link ¯\_(ツ)_/¯ | ||
Jul 21, 2024 | » | Minimum Penalty for a Shop
4 min; updated Jul 21, 2024
Minimum Penalty for a Shop. leetcode.com . Accessed Jul 21, 2024. Problem You are given the customer visit log of a shop represented by a zero-indexed string customers consisting only of characters N and Y. If the \(i^{th}\) character is Y, it means that customers come at the \(i^{th}\) hour, whereas N indicates that no customers come at the \(i^{th}\) hour. If the shop closes at the \(j^{th}\) hour (\(0 \le j \le n\)), the penalty is calculated as follows:... |