Return the number of total permutations of the provided string that don’t have repeated consecutive letters. Assume that all characters in the provided string are each unique.

For example, “aab” should return 2 because it has 6 total permutations ( "aab , aab , aba , aba ,baa , baa ), but only 2 of them ( “aba” and “aba” ) don’t have the same letter (in this case “a” ) repeating.

Hi, I need help understanding permutation. Let’s say we have “abcd” the permutation for this is 24. So then the permutation for “aab” is not 6, since order matters but instead 3. Or am doing this wrong. The unique ways to arrange “aab” are aab ,aba, baa. Please help me. How is aab and aab unique. Please