{"id":"detect-capital-counting-reduction","text":"detectCapitalUse counts uppercase characters in a single O(n) pass via generator expression, then derives all three valid patterns (all-upper, all-lower, first-only-upper) from that single count.","truth_value":"IN","source":"entries/2026/06/06/detect-capital-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"detect-capital-counting-reduction","truth_value":"IN","reason":"premise"}]}}