Python Simple Brute Force Solution | O(n)
Intuition\nThe given code aims to determine the year with the maximum population based on a list of birth and death year intervals (logs). The goal is to iterat
# Intuition\nThe given code aims to determine the year with the maximum population based on a list of birth and death year intervals (logs). The goal is to iterate through the intervals to find the earliest year (birth year) with the highest number of people alive.\n\n# Approach\n    Initialize _min and _max to 2050 and 1950 respectively. These variables will store the minimum and maximum years found in the logs, acting as bounds for the birth years\' range.\n\n    Iterate through the logs list to find the actual minimum and maximum years. This ensures that we know the range within which the birth years can fall.\n\n    Initialize earliest as _min and ans as 0. These variables will keep track of the year with the highest population and the maximum population count, respectively.\n\n    Loop through each year in the range _min to _max + 1 (inclusive). For each year:\n    a. Initialize a people counter to 0. This counter will keep track of the number of people alive during the current year.\n    b. Iterate through each log in the logs list. If the current year falls within the birth and death year interval of a log, increment the people counter.\n    c. Compare the people counter with the current maximum population count (ans). If the people counter is greater, update ans to people and earliest to the current year.\n\n    Return earliest, which will represent the year with the highest population count.\n\n# Complexity\n- Time complexity:\n$$O(n * 100)$$ -> $$O(n)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```\nclass Solution:\n    def maximumPopulation(self, logs: List[List[int]]) -> int:\n        _min, _max = 2050, 1950\n        for log in logs:\n            if log[0] < _min:\n                _min = log[0]\n            if log[1] > _max:\n                _max = log[1]\n        earliest, ans = _min, 0\n        for year in range(_min, _max + 1):\n            people = 0\n            for log in logs:\n                if log[0] <= year < log[1]:\n                    people += 1 \n            if people > ans:\n                ans = people\n                earliest = year\n        return earliest\n```
['Array', 'Counting', 'Python3']