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
static int maxLength ( String s , int n ) { int ans = Integer . MIN_VALUE ; Vector < Integer > A = new Vector < Integer > ( ) ; Vector < Integer > L = new Vector < Integer > ( ) ; Vector < Integer > R = new Vector < Integer > ( ) ; int [ ] freq = new int [ n + 5 ] ;