Cố Trường Ca
Senior Member
Luân sợ à3 ngày tới chắc 3 bài HardJavaScript:function countConsistentStrings(allowed: string, words: string[]): number { const arr = new Array(26).fill(0); for (const c of allowed) arr[c.charCodeAt(0) - 'a'.charCodeAt(0)]++ let res = 0; for (const w of words) { let check = true; for (const c of w) { if (!arr[c.charCodeAt(0) - 'a'.charCodeAt(0)]) { check = false; break; } } res += check ? 1 : 0; } return res; };![]()
hay 1k5 là đáy xã hội rồi
làm hard riết mất não chán nản quá





