Function to return the length of the longest sub string having frequency of a character greater than half of the length of the sub string
function maxLength ( s , n ) { var ans = - 2147483648 ; var A = [ ] ; var L = [ ] ; var R = [ ] ; var freq = new Array ( n + 5 ) . fill ( 0 ) ;