I want to ask if someone has already have an article or working algorithm where it can get all the combination possible in a given word.
Example: "ABCD"
possible combinations or arrangement without duplicates:
"ABCD"
"ABC"
"ABD"
"BCD"
"AB"
"AC"
"AD"
"BC"
"CA" <--- is the same as "AC"
"CBA" <--- is the same as "ABC" or "BCA"
"BD"