Function to check if the string s consists of a single distinct character or not
function isUnique ( s ) { var set = new Set ( ) ; for ( let i = 0 ; i < s . length ; i ++ ) { set . add ( s [ i ] ) ; } return set . size == 1 ; }