Runs 100% - easy understanding solution with comments
Always try to bring the complexity down by gathering requirements, here we used arrays of size 101, as the year is from 1950 to 2050\n\nUpvote if you like this 
Always try to bring the complexity down by gathering requirements, here we used arrays of size 101, as the year is from 1950 to 2050\n\nUpvote if you like this solution!\n\n```\nclass Solution {\n    public int maximumPopulation(int[][] logs) {\n        \n        //we know the input is from 1950 to 2050\n        //index 0 is 1950, 1 is 1951 and so on..\n        int[] populationAtYear = new int[101];\n        \n        \n        //max year population setting it to 1950, as thats the starting year as per question\n        int maxYearPopulation=1950;\n        \n        //maintaining no. of people born and dead at a particular year\n        //if its positive we have people alive, if negative we have more death in that year\n        for(int i=0;i<logs.length;i++){\n            \n            int birthYear = logs[i][0];\n            int deathYear = logs[i][1];\n            \n            populationAtYear[birthYear-1950]++;\n            populationAtYear[deathYear-1950]--;\n        }\n        \n        //Set maxPopulation to 1st value\n        int maxPopulation=populationAtYear[0];\n        \n        //lets start from index 1 and iterate over the array we formed which has total people alive/dead at a year\n        for(int i=1;i<populationAtYear.length;i++){\n            \n            //accumulate the sum at each year and see if maxPopulation is less than newly commuted population \n            populationAtYear[i]=populationAtYear[i]+populationAtYear[i-1];\n            \n            \n            //keep tracking year and population\n            if(maxPopulation<populationAtYear[i]){\n                maxPopulation=populationAtYear[i];\n                maxYearPopulation=1950+i;\n            }\n        }\n        \n        return maxYearPopulation;\n    }\n}\n```
['Array', 'Prefix Sum', 'Java']