views:

107

answers:

0

generate all possible subsets of a given Set that contain n elements using stack and queue without using recursion.

and then find the complexity of this pseudo code

so if we have a set {1,2,3) then the subsets are 2^n so its 2^3 and its 8 subsets

result will be {} {1} {2] {3} {1,2} {1,3} {2,3} {1,2,3}