Java || 100% || Straightforward
Array size as per declared constraints and adjusting array indexes while referencing it...\n\nThanks for dropping by...Pls upvote if it\'s useful to you... :-)\
Array size as per declared constraints and adjusting array indexes while referencing it...\n\nThanks for dropping by...Pls upvote if it\'s useful to you... :-)\n\n\n```\nclass Solution {\n    public int maximumPopulation(int[][] logs) {\n        int[] alive = new int[101]; //1950-2050+1\n        int max=Integer.MIN_VALUE;\n        int count=0, year=0;\n        \n        for(int[] log:logs) {\n            alive[log[0]-1950]++;\n            alive[log[1]-1950]--;\n        }\n        \n        for(int i=1950; i<=2050; i++) {\n            count += alive[i-1950];\n            \n            year = max < count ? i : year;\n            max=Math.max(max,count);\n        }\n        \n        return year;\n    }\n}\n```
['Array']