js two pointer
\nvar maxLengthBetweenEqualCharacters = function(s) {\n    let max = -1\n    for(var i =0 ; i <s.length; i++){\n        for(var j = s.length-1; j>i ;j--){\n    
```\nvar maxLengthBetweenEqualCharacters = function(s) {\n    let max = -1\n    for(var i =0 ; i <s.length; i++){\n        for(var j = s.length-1; j>i ;j--){\n            if(s[j]===s[i]){\n                max = Math.max(max, j-i-1)\n                break\n            }\n        }\n    }\n    return max\n}\n```
['JavaScript']