diet-plan-sliding-window-o-n

Status: IN

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.

Source: entries/2026/06/06/diet-plan-performance-solution.md

JSON