C++ Beginner Friendly + Highly Readable Code
PLZ UPVOTE IF YOU LIKED IT\n\n\nclass Solution {\npublic:\n    int maxLengthBetweenEqualCharacters(string s) {\n        unordered_map<char,int> umap;\n        i
**PLZ UPVOTE IF YOU LIKED IT**\n\n```\nclass Solution {\npublic:\n    int maxLengthBetweenEqualCharacters(string s) {\n        unordered_map<char,int> umap;\n        int ans=-1;\n        \n        for(int i=0;i<s.size();i++){\n            char c=s[i];\n            if(umap.find(c)!=umap.end())\n\t\t\t   ans=max(ans,i-umap[c]-1);\n            else \n\t\t\t   umap[c]=i;\n        }\n        \n        return ans;\n    }\n};\n```
['C', 'C++']