So for example, if I have the sequence [1,2,3], what would be an algorithm to produce the subseqeunces:
[1]
[2]
[3]
[1,2]
[2,3]
[1,2,3]
but not
[1,3]
nor
[3,2]
I'm then hoping to insert these as the keys in a dictionary along with the result from looking up these unique subsets in a database forming the value. I wonder if you could help with that?
Thanks very much!