Easy solutions IN ALL LANGUAGE
Dart []\nclass Solution {\n  int maxLengthBetweenEqualCharacters(String s) {\n    for (int i=s.length-1; i>0;i--){\n        for (int j=0; j+i<s.length; j++){\n 
```Dart []\nclass Solution {\n  int maxLengthBetweenEqualCharacters(String s) {\n    for (int i=s.length-1; i>0;i--){\n        for (int j=0; j+i<s.length; j++){\n            if (s[j] == s[j+i]) return i-1;\n        }\n    }\n    return -1;\n  }\n}\n\n```\n```Java []\nclass Solution {\n    public int maxLengthBetweenEqualCharacters(String s) {\n    String[] s1=s.split("");\n    for (int i=s1.length-1; i>0;i--){\n        for (int j=0; j+i<s1.length; j++){\n            if (s1[j].equals(s1[j+i])) return i-1;\n        }\n    }\n    return -1;\n    }\n}\n```\n```Python []\nclass Solution(object):\n    def maxLengthBetweenEqualCharacters(self, s):\n        """\n        :type s: str\n        :rtype: int\n        """\n        for i in range(len(s) - 1, 0, -1):\n            for j in range(len(s) - i):\n                if s[j] == s[j + i]:\n                    return i - 1\n        return -1\n```\n```Python3 []\nclass Solution:\n    def maxLengthBetweenEqualCharacters(self, s: str) -> int:\n        for i in range(len(s) - 1, 0, -1):\n            for j in range(len(s) - i):\n                if s[j] == s[j + i]:\n                    return i - 1\n        return -1\n```\n```c++ []\nclass Solution {\npublic:\n    int maxLengthBetweenEqualCharacters(const std::string& s) {\n        std::vector<std::string> s1;\n        for (char c : s) {\n            s1.push_back(std::string(1, c));\n        }\n\n        for (int i = s1.size() - 1; i > 0; --i) {\n            for (int j = 0; j + i < s1.size(); ++j) {\n                if (s1[j] == s1[j + i]) {\n                    return i - 1;\n                }\n            }\n        }\n\n        return -1;\n    }\n};\n```\n\n
['Math', 'Dynamic Programming', 'Python', 'C++', 'Java', 'Python3', 'Dart']