{"id":"linear-time-two-scan","text":"`maxDistance` achieves O(n) time and O(1) space via two linear scans with early termination, anchoring at opposite endpoints.","truth_value":"IN","source":"entries/2026/06/06/two-furthest-houses-with-different-colors-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"linear-time-two-scan","truth_value":"IN","reason":"premise"}]}}