Function to find the longest substring in the string which contains atmost K characters from the given set of characters
static int maxNormalSubstring ( String P , Set < Character > Q , int K , int N ) {