Simple java code 0 ms beats 100 %
\n# Complexity\n- \n\n# Code\n\nclass Solution {\n    public int maximumPopulation(int[][] logs) {\n        int[] year = new int[2051];\n        for(int[] log :
\n# Complexity\n- \n![image.png](https://assets.leetcode.com/users/images/dfafd24c-87d0-4752-b389-c491f98ad785_1704644926.2663984.png)\n# Code\n```\nclass Solution {\n    public int maximumPopulation(int[][] logs) {\n        int[] year = new int[2051];\n        for(int[] log : logs){\n            year[log[0]] += 1;\n            year[log[1]] -= 1;\n        }\n        \n        int maxNum = year[1950], maxYear = 1950;\n    \n        for(int i = 1951; i < year.length; i++){\n            year[i] += year[i - 1];  \n            \n            if(year[i] > maxNum){\n                maxNum = year[i];\n                maxYear = i;\n            }\n        }\n        \n        return maxYear;\n    }\n}\n```
['Java']