If given a list of strings such as arr = ["abc", "efgh", "ij"]
, I want to know all the combinations starting from the first word to the last using recursion.
so the output will look like this:
aei
aej
afi
afj
agi
...
chj
all the codes I see are just using the permutation of one string.
I've been thinking that the concept is something like the fundamental counting principle like the one in the picture but I can't really put it into code.