You are viewing a single comment's thread. Return to all comments →
Java 7
public static String stringsXOR(String s, String t) { StringBuffer res = new StringBuffer(); for(int i = 0; i < s.length(); i++) { if(s.charAt(i) == t.charAt(i)) res.append("0"); else res.append("1"); } return res.toString().trim(); }
Seems like cookies are disabled on this browser, please enable them to open this website
XOR Strings 2
You are viewing a single comment's thread. Return to all comments →
Java 7