Available question text
Given a string of 'Y'/'N' arrivals, choose an index j (0..n) to close the shop so that open hours with 'N' and closed hours with 'Y' incur the fewest penalties; return the earliest j minimizing that score. This reduces to finding the split that minimizes mismatches and can be found with a single pass using prefix/suffix counts.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2483. Minimum Penalty for a Shop
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source