JAVA Counting solution using Prefix Sum | Beats 100%
\npublic int maximumPopulation(int[][] logs) {\n\tint[] ppl = new int[101]; \n\tint max = 0, idx = 0, lastSum = 0;;\n\tfor ( int i = 0; i < logs.length; i++ ) {
```\npublic int maximumPopulation(int[][] logs) {\n\tint[] ppl = new int[101]; \n\tint max = 0, idx = 0, lastSum = 0;;\n\tfor ( int i = 0; i < logs.length; i++ ) {\n\t\tppl[logs[i][0] - 1950]++;\n\t\tppl[logs[i][1] - 1950]--;\n\t}\n\tfor ( int i = 0; i < ppl.length; i++ ) {\n\t\tlastSum += ppl[i];\n\t\tif ( lastSum > max ) {\n\t\t\tmax = lastSum;\n\t\t\tidx = i;\n\t\t}\n\t}\n\treturn idx + 1950;\n}\n```
['Counting', 'Iterator', 'Prefix Sum', 'Java']