diff --git a/algorithms/CPlusPlus/Recursion/Subsets-Of-array-recusion.cpp b/algorithms/CPlusPlus/Recursion/Subsets-Of-array-recusion.cpp new file mode 100644 index 00000000..451fa6aa --- /dev/null +++ b/algorithms/CPlusPlus/Recursion/Subsets-Of-array-recusion.cpp @@ -0,0 +1,45 @@ +//Program to get all the subsets/powersets of any array + + + +#include +#include +using namespace std; + + +void GetSubsets(int nums[],int index,vector arr1,int n){ + + + if(index == n){ + for(auto it:arr1){ + cout<< it<<" "; + } + cout< arr3; + GetSubsets( arr2 ,index,arr3,n); +} + + + + + + + + +