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 = int . MinValue ; List < int > A = new List < int > ( ) ; List < int > L = new List < int > ( ) ; List < int > R = new List < int > ( ) ; int [ ] freq = new int [ n + 5 ] ;