c++ solution in 1 traversal ✔
\nclass Solution {\npublic:\n    int maxScoreSightseeingPair(vector<int>& arr) {\n        int currMax= arr[0], ans= INT_MIN;\n        \n        for(int i=1;i<ar
```\nclass Solution {\npublic:\n    int maxScoreSightseeingPair(vector<int>& arr) {\n        int currMax= arr[0], ans= INT_MIN;\n        \n        for(int i=1;i<arr.size();i++){\n            ans= max(ans, currMax+arr[i]-i);\n            currMax= max(currMax, arr[i]+i);\n        }\n        \n        return ans;\n    }\n};\n```
['C', 'C++']