Function to find the number of ways to replace ' ? ' in string t to get the same count of 0 s and 1 s in the string S and T
function countWays ( s , t ) { let n = s . length ; let sum1 = 0 , sum2 = 0 , K = 0 ;