Solución
solution.tsTypeScript
export function commonChars(a: string, b: string): number {
// Escribe tu solución aquí
const words1 = new Set(a.toLowerCase().split(''))
const words2 = new Set(b.toLowerCase().split(''))
return Array.from(words1).filter(value=> words2.has(value)).length;
}
0respuestas