// Basic approach:// Sort the letters, then compare them// one by one, and bail out as soon as// we see a letter in s2 that s1 can't supply list1 = str1.split('').sort(); list2 = str2.split('').sort();