Hi,

I feel really disappointed today, i was stuck at task https://www.freecodecamp.org/challenges/no-repeats-please…

So i went through tutorials and videos for the permutation …

I came across this solution that if i have say abcdefa , i can take 7! and subtract it with possible combination of “aa” together if they are unique … that is `6! + 6!`

, i subtract this with …So if i take `7!`

its 5040 , i then subtract it with `6!X2! = 5040- 1440 = 3600`

, which came as correct so i started writing down coding algo for this …

But soon i found it worked only when i had one alphabet appear only twice then i tried with aaabb, here i started getting totally different results - as total is 120 , i subtract 4! + 4! for taking b as one so i subtract `120- 48 = 72`

now i have the 3 a , so i take them as one “aaa” , now i have 3 unique character left considering “aaa” is one, this in itself can have 3! combinations so i do`3! X 3!`

so i have 36 here …

Now i have `120 - 48 -36 = 36`

but the FCC answer is 12 …

I went through videos and links like here - https://stackoverflow.com/questions/32282607/permutations-excluding-repeated-characters/36178855#36178855 but could not understand much

Gone through several youtube videos still i can understand the repeat and non repeat formulae like `n!/n! - r!`

or n!/n1!.n2! etc , but not what to do with this problem, what can i do next, it seems i am always stuck when some thing difficult comes up …Kindly guide …

Thanks