single-pass-max-tracking-idiom

Status: IN

The repo prefers single-pass algorithms with running accumulators over multi-pass approaches that materialize intermediate lists, as seen in rectangle counting (O(n) with running max+count) and line writing (O(n) greedy scan)

Source: entries/2026/06/06/number-of-rectangles-that-can-form-the-largest-square-solution.md, entries/2026/06/06/number-of-lines-to-write-string-solution.md

JSON