{"id":"sliding-window-o1-update-pattern","text":"`min_operations` (recolors) updates the window count in O(1) per step by adding the incoming element and removing the outgoing one, using Python's `bool`-to-`int` coercion (`True == 1`, `False == 0`) in a single arithmetic expression.","truth_value":"IN","source":"entries/2026/06/06/minimum-recolors-to-get-k-consecutive-black-blocks-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"sliding-window-o1-update-pattern","truth_value":"IN","reason":"premise"}]}}