Need a Java function to find intersection of two strings. i.e. characters common to the strings.
Example:
String s1 = new String(\"Sychelless\"); St
Optimized solution:
public static String twoStrings(String s1, String s2){ HashSet stringOne = new HashSet(), stringTwo = new HashSet(); int stringOneLength = s1.length(); int stringTwoLength = s2.length(); for(int i=0; i