✔️RECURSION+MEMOIZATION || PICK OR NOT PICK INTUITIVE AND SIMPLE
\nclass Solution {\npublic:\n    vector<vector<int>> dp;\n    int check(int i, int c,vector<int>& v)\n    {\n        if(i==v.size()) return -1e9;\n        if(dp
```\nclass Solution {\npublic:\n    vector<vector<int>> dp;\n    int check(int i, int c,vector<int>& v)\n    {\n        if(i==v.size()) return -1e9;\n        if(dp[i][c]!=-1) return dp[i][c];\n        int skip=check(i+1,c,v);  // we do not consider this element for our pair and move to next element \n        if(c) return dp[i][c]= max(skip,v[i]+i+check(i+1,0,v)); //  we consider this as first element of our pair\n        return dp[i][c]= max(skip,v[i]-i); //we consider this as our second element of our pair\n    }\n    int maxScoreSightseeingPair(vector<int>& values) {\n        dp.resize(values.size(),vector<int>(2,-1));\n        return check(0,1,values);\n    }\n};\n```
['Dynamic Programming', 'Recursion', 'C']