Driver program to test above
int main ( ) { int arr [ ] = { 4 , 2 , 1 , 9 , 2 , 6 , 5 , 3 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << " Number ▁ of ▁ subsets ▁ = ▁ " << countSubsets ( arr , n ) ; return 0 ; }