{"id":"difference-array-technique","text":"`maxAliveYear` uses the difference-array (sweep-line) pattern: record +1 at birth and -1 at death, then prefix-sum to reconstruct population, achieving O(n + R) instead of O(n * R).","truth_value":"IN","source":"entries/2026/06/06/maximum-population-year-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"difference-array-technique","truth_value":"IN","reason":"premise"}]}}