I am in the process of tallying the frequency of each individual character within a given string and representing them as numbers.
For example, let's consider the string "HelloWorld".
HELLOWORLD There is one H - so 1 should be displayed with H removed.
ELLOWORLD There is one E - so 1 should be displayed and E removed.
LLOWORLD There are three L - so 3 should be displayed and all L characters removed.
OWORD There are two O - so 2 should be displayed and all O characters removed.
WRD There is only one occurrence of each character - so simply display 1 1 1.
In the end, I would like to concatenate all the numbers to get the result:
1132111 (this can be represented as either a string or a number).
Would it be possible to achieve this?
Thank you for taking the time to read this, any tips or advice would be greatly appreciated!