
word의 Set 변환 -> 중복 제거 및 탐색 시간복잡도 감소set 순회function numberOfSpecialChars(word: string): number {
const set = new Set(word)
let specialChars = 0
for(const char of set) {
const curUpper = char.toUpperCase()
if(char === curUpper) continue
if(set.has(curUpper)) specialChars++
}
return specialChars
};