You are viewing a single comment's thread. Return to all comments →
function twoStrings(s1, s2) { let a = new Set(s1); let b = new Set(s2); for (const letter of b) { if (a.has(letter)) { return "YES"; } } return "NO"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Two Strings
You are viewing a single comment's thread. Return to all comments →
My JavaScript solution that passes all of the test cases