Java| Easy Solution
class Solution {\n    public int maximumPopulation(int[][] logs) {\n        int a[]=new int [101];\n        for (int i = 0; i < logs.length ; i++) \n        {\n
class Solution {\n    public int maximumPopulation(int[][] logs) {\n        int a[]=new int [101];\n        for (int i = 0; i < logs.length ; i++) \n        {\n            for (int j = logs[i][0]; j <logs[i][1] ; j++)\n            {     // to traverse from birth year to death year\n                a[j-1950]++;  \n                // store population from oth position of a[] i.e a[0]=1.......\n            }\n        }\n        int maxVal=0;\n        int maxYear=1950;\n        for (int i = 0; i < 101; i++)\n        {\n            if(a[i]>maxVal)\n            {\n                maxVal=a[i];\n                maxYear=i+1950;\n            }\n        }\n        return maxYear;\n    }\n}
[]