Hi everyone, first time posting in this particular forum, hope i chose the right place
Ok so i have this problem; I am given a vector containing Strings in them say for example,"name","Telephone","address"..etc (personal information bascially).
To simplify the problem i think maybe ill just make each
string in the array correspond to a letter in the alphabet ie.name=a,telephone=b,address=c.
Ok so say i am passed a vector with "a","b","c", i need to be able to create all the sets of these, without repeating any letters in a set.So basically my answer to this should just be;
a,b,c,ab,ac,bc,abc
But my method to do this must also be able to handle any amount of inputs, not just three, so i could have a,b,c,d,e...then must be able to find all the sets of those as well.
I started this using for loops but i think i began to realize that it didnt work for N inputs, because each time i wanted more inputs i needed more for loops, so its bascially useless what ive done so far.Maybe recursion or something might be useful, anyone have any ideas?
Thanks for patiently reading, hope to hear some suggestions!