linear-time-two-scan

Status: IN

`maxDistance` achieves O(n) time and O(1) space via two linear scans with early termination, anchoring at opposite endpoints.

Source: entries/2026/06/06/two-furthest-houses-with-different-colors-solution.md

JSON