Company: expedia_26aug
Difficulty: medium
Balanced String Regex Problem Description A string, s , is composed of the letters a , b , c , and d . The string is said to be balanced if both of the following conditions are satisfied: The summed number of a 's and c 's is even. The summed number of b 's and d 's is even. For example, the string 'abcd' (a count = 1, c count = 1 -> 1+1=2, even; b count = 1, d count = 1 -> 1+1=2, even) is balanced, but 'abc' and 'bcd' are not. Complete the code by filling in the blank with a RegEx that only matches balanced strings. import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Regex_Test tester = new Regex_Test(); tester.checker("___FILL_IN_REGEX_HERE___"); // Use \\ instead of using \ } } class Regex_Test { public void checker(String Regex_Pattern){ Scanner Input = new Scanner(System.in); String Test_String = Input.nextLine(); Pattern p = Pattern.compile(Regex_Pattern); Matcher