@@ -0,0 +1,871 @@
+// https://www.hackerrank.com/challenges/two-strings%0A%0Aimport java.util.Scanner;%0A%0A/*%0Ainput/output%0A---------%0A2%0Ahello%0Aworld%0Ahi%0Aworld%0A%0AYES%0ANO%0A--------%0A%0A */%0A%0Apublic class TwoStrings %7B%0A%0A%09static String twoStrings(String s1, String s2)%7B%0A        // Complete this function%0A%09%09int count = 0;%0A%09%09int len = (s1.length() %3E= s2.length()) ? s2.length():s1.length();%0A%09%09for (int i = 0; i %3C len; i++) %7B%0A%09%09%09if(s1.charAt(i) == s2.charAt(i)) %7B%0A%09%09%09%09count++;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if(count %3E 0) %7B%0A%09%09%09return %22YES%22;%0A%09%09%7D else %7B%0A%09%09%09return %22NO%22;%0A%09%09%7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Scanner in = new Scanner(System.in);%0A        int q = in.nextInt();%0A        for(int a0 = 0; a0 %3C q; a0++)%7B%0A            String s1 = in.next();%0A            String s2 = in.next();%0A            String result = twoStrings(s1, s2);%0A            System.out.println(result);%0A        %7D%0A        in.close();%0A    %7D%0A%0A%7D%0A

solution strings 23aug17