[Python3] greedy
\n\nclass Solution:\n    def maximumPopulation(self, logs: List[List[int]]) -> int:\n        vals = []\n        for x, y in logs: \n            vals.append((x, 
\n```\nclass Solution:\n    def maximumPopulation(self, logs: List[List[int]]) -> int:\n        vals = []\n        for x, y in logs: \n            vals.append((x, 1))\n            vals.append((y, -1))\n        ans = prefix = most = 0\n        for x, k in sorted(vals): \n            prefix += k\n            if prefix > most: \n                ans = x\n                most = prefix \n        return ans \n```
['Python3']