python 3 easy solution
last year I solved this problem from hackerrank, \nhttps://www.hackerrank.com/challenges/crush/problem\nI just used the exact same idea with slight modification
last year I solved this problem from hackerrank, \nhttps://www.hackerrank.com/challenges/crush/problem\nI just used the exact same idea with slight modification. \nWell frankly speaking I couldn\'t figure out that this approach could be followed to solve this leetcode problem, after looking at a video tutorial I suddenly remembered.  \nhope you like the solution\n\n```\ndef maximumPopulation(self, logs: List[List[int]]) -> int:\n\tminy, maxy = 2051, 1949\n\tdic = {}\n\n\tfor l in logs:\n\t\tif l[0] in dic:\n\t\t\tdic[l[0]]+=1\n\t\telse:\n\t\t\tdic[l[0]]=1\n\t\tif l[1] in dic:\n\t\t\tdic[l[1]]-=1\n\t\telse:\n\t\t\tdic[l[1]]=-1\n\t\tminy, maxy = min(miny, l[0]), max(maxy, l[1])\n\n\tmaxb, b = 0, 0\n\tfor i in range(miny, maxy+1):\n\t\tif i in dic:\n\t\t\tb+=dic[i]\n\t\tif b>maxb:\n\t\t\tmaxb = b\n\t\t\tres = i\n\treturn res\n```
['Python3']