Hi.I want to compute all the subsets of a set.For example for the set:
{1,2,3,4}
I want to find the following:
{1}
{2}
{3}
{4}
{1,2}
{1,3}
{1,4}
{2,3}
{2,4}
{3,4}
{1,2,3}
{1,2,4}
{1,3,4}
{2,3,4}
{1,2,3,4}
But I want to do it iteratively NOT recursively.
Are there any suggestion?
I'm not looking for the code.Just an algorithm or some ideas.
Thank you in advance.