Function to return the minimum number of characters of the given binary string to be replaced to make the string alternating
function minReplacement ( s , len ) { var ans = 0 ; for ( var i = 0 ; i < len ; i ++ ) {