Algorithm to Count Permutations Without Adjacent Repeating Characters and Find the Inverse
I would appreciate the help of this great community in finding an algorithm (in any programming language, though I have it in Visual Basic) to solve two related problems: