{"id":"single-pass-dual-max-tracking","text":"`checkZeroOnes` computes both `max_ones` and `max_zeros` in a single O(n) pass with O(1) space, updating the relevant max on every character rather than only at run boundaries","truth_value":"IN","source":"entries/2026/06/06/longer-contiguous-segments-of-ones-than-zeros-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"single-pass-dual-max-tracking","truth_value":"IN","reason":"premise"}]}}