题解 | #字符串字符匹配#
字符串字符匹配
https://www.nowcoder.com/practice/22fdeb9610ef426f9505e3ab60164c93
const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void async function () {
const str1 = await readline();
const str2 = await readline();
const [longStr,shortStr] = str1.length>str2.length?[str1,str2]:[str2,str1];
const set = new Set(longStr);
for(const c of shortStr){
if(!set.has(c)) return console.log(false);
}
return console.log(true);
}()
