Given an input n and strings, for example:
3
abc
de
fgh
how would it be permuted to the output:
adf
adg
adh
aef
aeg
aeh
bdf
bdg
bdh
bef
beg
beh
cdf
cdg
cdh
cef
ceg
ceh
Its my first time seeing this type of problem, and we're only allowed to use recurssive functions so no imports i only know regular permutation of strings. I dont know how to tackle this problem can someone help me with a solution? thanks in advance!