Not asking for help coding this out, yet. I just want to know why
permAlone("aabb") should return 8.
I think of all the permutations from those letters, the only ones that don’t repeat a letter are “baba” and “abab”
The only others I can think of are
“aabb, bbaa, baab, abba”
Unless we don’t need to use all the letters? I’m not sure about that because the example they give us keeps all the letters as they’re being rearranged.
function permAlone(str) {
return str;
}
permAlone('aab');
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.26
Challenge: Algorithms - No Repeats Please
Link to the challenge: