forked from M3-Academy/challenge-algorithms-v2.0
feature/algoritmos #1
@ -1,4 +1,10 @@
|
||||
export function mostUsedChar(text) {
|
||||
// implementar logica aqui
|
||||
return ""
|
||||
}
|
||||
// implementar logica aqui
|
||||
let textLower = text.toLowerCase().split("").sort();
|
||||
for (let index = 1; index < textLower.length; index++) {
|
||||
textLower = textLower.filter((e, i, a) => a.indexOf(e) !== i);
|
||||
}
|
||||
|
||||
let letter = [...new Set(textLower)];
|
||||
return letter.join("");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user