GE HealthCare·Software Engineer·Technical Phone Screen
- Given a string of 'Y' and 'N' characters representing customer arrivals per hour, find the earliest closing hour that minimizes the total penalty, where penalty is the count of empty open hours before closing plus the count of customers who arrive after closing.
“My first instinct was brute force, just loop over every possible closing time and compute the penalty.”