{"id":"diet-plan-sliding-window-o-n","text":"The diet plan solution runs in O(n) time and O(1) space by computing the first window sum once, then incrementally adding the entering element and subtracting the leaving element.","truth_value":"IN","source":"entries/2026/06/06/diet-plan-performance-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"diet-plan-sliding-window-o-n","truth_value":"IN","reason":"premise"}]}}