export function mostUsedChar(text) { let h = new Set(); for(let i = 1; i <= text.length - 1; i++) { let c = text[i]; if (h.has(c)) return c; else h.add(c); } return '\0'; }