回溯法求一个集合的所有子集
Description:
描述:
This is a standard interview problem to find out the subsets of a given set of numbers using backtracking.
这是一个标准的面试问题,它使用回溯来找出给定数字集的子集。
Problem statement:
问题陈述:
There is a set contains N number of elements. You have to find out all the possible subsets of the given set and print them.
有一个包含N个元素的集合。 您必须找出给定集合的所有可能子集并进行打印。
Input:
Test case T
//T no. of lines with the value of N and corresponding values.
E.g.
2
4
1 2 3 4
2
7 8
1<=T<=100
1<=N<=1000
Output:
Print the subsets of the set.
Example
例
T