I have an array with 6 items and I need to generate all permutations of lengths 4, 5, and 6. For example, if my array has a, b, c, d,e, f then
permutations of length 4 would be:
pemutations of length 5 would be:
and so on.
I know how to generate all permutations of length 6, which would use all the items in the array, but am not sure how to do if choosing lengths 4 and 5. Any help is appreciated. thanks.