Company: UKG_12sep
Difficulty: medium
Balanced Strings Problem Description A string s is made up only of the letters a , b , c and d . The string is balanced when both of the following conditions hold: the summed number of a 's and c 's in s is even, and the summed number of b 's and d 's in s is even. For example, abcd is balanced: its a count plus its c count is 1 + 1 = 2 , which is even, and its b count plus its d count is 1 + 1 = 2 , which is also even. By contrast, abc is not balanced (the b / d total is 1 ), and neither is bcd (the a / c total is 1 ). Determine whether the given string is balanced. The original assessment asked for a regular expression that matches exactly the balanced strings and was checked with a whole-string match. Here any method is accepted: only the printed verdict is judged. Function Description Complete the function solve in the editor. It has the following parameter: string s : the string to check It returns a boolean: true if s is balanced, otherwise false . Input Format Read from standard