C++|| DP|| RECURSION + MEMOIZATION
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\n    int f(int ind, int prev, string s, int n, vector<vector<int>> &dp)\n    {\n        if(ind >= n)\n        {\n            return 0;\n        }\n        if(dp[ind][prev] != -1)\n        {\n            return dp[ind][prev];\n        }\n        if(abs(s[ind] - s[prev]) <= 1)\n        {\n            return dp[ind][prev] = 1 + f(ind + 2, ind + 1, s, n, dp);\n        }\n        else\n        {\n            return dp[ind][prev] = f(ind + 1, ind, s, n, dp);\n        }\n    }\n    int removeAlmostEqualCharacters(string word) {\n        int n = word.size();\n        vector<vector<int>> dp(n + 1, vector<int>(n + 1, -1));\n        return f(1, 0, word, n, dp);\n    }\n};\n```
['Dynamic Programming', 'Greedy', 'Recursion', 'Memoization', 'C++']