Edit: I just found out that what I was doing called permutations, and its different from combination. However, am happy to figure it out by my self.
Calculates the diversity of a string.
I stumbled on a difficult problem that I couldn't easily solve on paper. However, I learned the pattern and devised the rule to get the solution.
Here is a GIF that illustrate the problem
Recognizing that I utilized ChatGPT as a support tool to ensure that my code reached its highest potential.