an array to keep track of count of each alphabet
let hash_char = new Array ( 26 ) ; for ( let i = 0 ; i < hash_char . length ; i ++ ) { hash_char [ i ] = 0 ; } for ( ; rp < len ; rp ++ ) { hash_char [ s [ rp ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] ++ ; while ( hash_char [ s [ rp ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] > k ) {