C++ Simple - Brute-force
Simple, straight forward solution. \n\nclass Solution\n{\npublic:\n  int maxLengthBetweenEqualCharacters(string s)\n  {\n    int size = s.length();\n    int ans
Simple, straight forward solution. \n```\nclass Solution\n{\npublic:\n  int maxLengthBetweenEqualCharacters(string s)\n  {\n    int size = s.length();\n    int answer = -1;\n    for (int i = 0; i < size - 1; i++)\n    {\n      for (int j = i + 1; j < size; j++)\n      {\n        if (s[i] == s[j])\n        {\n          answer = max(answer, j - i - 1);\n        }\n      }\n    }\n    return answer;\n  }\n};\n```
[]