Increment count of current character If this count is one then a new distinct character is found in sliding window .
cnt [ str [ end ] - ' a ' ] ++ ; if ( cnt [ str [ end ] - ' a ' ] == 1 ) distEle ++ ;