C++ using Prefix Sum || O(n) Solution
\nclass Solution {\npublic:\n    int maximumPopulation(vector<vector<int>>& logs) {\n        int n=logs.size();\n        int pre[2055]={0};\n        for(int i=0
```\nclass Solution {\npublic:\n    int maximumPopulation(vector<vector<int>>& logs) {\n        int n=logs.size();\n        int pre[2055]={0};\n        for(int i=0;i<n;i++){\n            pre[logs[i][0]]++; pre[logs[i][1]]--;\n        }\n        for(int i=1950;i<=2051;i++){\n            pre[i]=pre[i-1]+pre[i];\n        }\n        int mx= max_element(pre,pre+2055)-pre;\n        return mx;\n    }\n};\n```
['C', 'Binary Tree', 'Prefix Sum']