C++ constant space
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maximumPopulation(vector<vector<int>>& logs) {\n        int ans =0;\n        int pop =0;\n        for(int i =1950;i<2050;i++){\n            int temp = 0;\n            for(auto j:logs){\n                if(j[0]<=i) temp++;\n                if(j[1]<=i) temp--;\n            }\n            if(temp>pop){\n                ans =i;\n                pop = temp;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']