text: To check a string S can be converted to a valid string by removing less than or equal to one character .
code: function isValidString ( str ) { let freq = new Array ( CHARS ) ; for ( let i = 0 ; i < CHARS ; i ++ ) { freq [ i ] = 0 ; }