@@ -0,0 +1,755 @@
+package java_problems.beginner;%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0Apublic class ChefAndWildcardMatching %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09%0D%0A%09%09Scanner sc = new Scanner(System.in);%0D%0A%09%09int numCases = Integer.parseInt(sc.nextLine());%0D%0A%09%09for (int i = 0; i %3C numCases; i++) %7B%0D%0A%09%09%09boolean canBeMatched = true;%0D%0A%09%09%09char%5B%5D arr1 = sc.nextLine().toCharArray();%0D%0A%09%09%09char%5B%5D arr2 = sc.nextLine().toCharArray();%0D%0A%09%09%09%0D%0A%09%09%09charLoop:%0D%0A%09%09%09for (int j = 0; j %3C arr1.length; j++) %7B%0D%0A%09%09%09%09if (arr1%5Bj%5D != '?' && arr2%5Bj%5D != '?') %7B%0D%0A%09%09%09%09%09if (arr1%5Bj%5D != arr2%5Bj%5D) %7B%0D%0A%09%09%09%09%09%09canBeMatched = false;%0D%0A%09%09%09%09%09%09break charLoop;%0D%0A%09%09%09%09%09%7D%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%7D%0D%0A%09%09%09if (canBeMatched) %7B%0D%0A%09%09%09%09System.out.println(%22Yes%22);%0D%0A%09%09%09%7D else %7B%0D%0A%09%09%09%09System.out.println(%22No%22);%0D%0A%09%09%09%7D%0D%0A%09%09%7D%0D%0A%09%09sc.close();%0D%0A%09%7D%0D%0A%7D

Add ChefAndWildcardMatching