Java Array Solution
\n    public int maximumPopulation(int[][] logs) {\n        int[] map = new int[101]; // Based on problem statement: 1950 <= birthi < deathi <= 2050, so we only
```\n    public int maximumPopulation(int[][] logs) {\n        int[] map = new int[101]; // Based on problem statement: 1950 <= birthi < deathi <= 2050, so we only need 101.\n        for(int[] l : logs){\n            for(int i = l[0]; i < l[1]; i++){\n                map[i - 1950]++;\n            }\n        }\n        int max = 0;\n        int res = -1;\n        for(int i = 0; i < 101; i++){\n            if(map[i] > max){\n                max = map[i];\n                res = i + 1950;\n            }\n        }\n        return res; \n    }\n```
[]