Java solution (both brute force and optimized)
\n// Brute force approach: O(N^2)\nclass Solution {\n    public int maximumPopulation(int[][] logs) {\n        int[] arr = new int[101];\n\n        for(int i = 
```\n// Brute force approach: O(N^2)\nclass Solution {\n    public int maximumPopulation(int[][] logs) {\n        int[] arr = new int[101];\n\n        for(int i = 0; i<logs.length; ++i){\n            for(int j=logs[i][0]; j<logs[i][1]; j++){\n                arr[j-1950]++;\n            }\n        }\n\n        int maxYear = 1950;\n        int maxVal = 0;\n        for(int i=0; i<arr.length; ++i){\n            if(arr[i]>maxVal) {\n                maxVal = arr[i];\n                maxYear = i + 1950;\n            }\n        }\n        return maxYear;\n    }\n}\n\n\n// Optimised solution: O(N)\nclass Solution {\n    public int maximumPopulation(int[][] logs) {\n        int[] arr =  new int[101];\n\n        for(int i=0; i<logs.length; ++i){\n            arr[logs[i][0] - 1950]++;\n            arr[logs[i][1] - 1950]--;\n        }\n\n        for(int i = 1; i<101; ++i){\n            arr[i] += arr[i-1];\n        }\n\n        int maxYear = 1950;\n        int maxVal = 0;\n        for(int i=0; i<arr.length; ++i){\n            if(arr[i]>maxVal) {\n                maxVal = arr[i];\n                maxYear = i + 1950;\n            }\n        }\n        return maxYear;\n    }\n}\n```
['Java']