[Java] Easy 100% solution - Line sweep
java []\nclass Solution {\n    public int maximumPopulation(final int[][] logs) {\n        final int[] dates = new int[101];\n\n        for(final int[] log : lo
```java []\nclass Solution {\n    public int maximumPopulation(final int[][] logs) {\n        final int[] dates = new int[101];\n\n        for(final int[] log : logs) {\n            dates[log[0] - 1950]++;\n            dates[log[1] - 1950]--;\n        }\n\n        int prefix = 0, maxCount = 0, date = 0;\n\n        for(int i = 0; i < 101; ++i) {\n            prefix += dates[i];\n\n            if(prefix > maxCount) {\n                maxCount = prefix;\n                date = i;\n            }\n        }\n\n        return date + 1950;\n    }\n}\n```
['Java']