Python, clean solution
Complexity

Time complexity:
O(n)


Space complexity:
O(1)

Code
# Complexity
- Time complexity:
$$O(n)$$

- Space complexity:
$$O(1)$$

# Code
```python3 []
class Solution:
    def maximumPopulation(self, logs: List[List[int]]) -> int:
        base = 1950 # base year
        n = 101
        population = [0] * n # 1950 to 2050
        year = 0
        max_pop = 0
        for [birth, death] in logs:
            birth -= base 
            death -= base 
            population[birth] += 1
            population[death] -= 1 # end of range is death-1; marking end of range
        for i in range(1, n):
            population[i] += population[i-1]
        for i, pop in enumerate(population):
            if pop > max_pop:
                year = i
                max_pop = pop
        return year + base 
```
['Array', 'Counting', 'Prefix Sum', 'Python3']