Binary multiple of 3 Time : Space : 1234567import java.util.regex.Pattern;public class BinaryRegexp { public static Pattern multipleOf3() { return Pattern.compile("^(0|1(01*0)*1)*$"); }}