Devi contare il numero di caratteri consecutivi, mantenendo l'ordine di comparsa dei caratteri unici function countSymbols(str){ const alphabet = new Map(); for (const ch of str) { alphabet.set(ch, alphabet.get(ch) ? alphabet.get(ch) + 1 : 1) } return }
Middle
125