Please provide a hint

please provide a hint

you simply have to call recursion
1st time include the current character and next time not include the character

2 points you have to keep in mind
The output should be printed as follows :

  1. Sets with least no of elements should be printed first.
  2. For equal length, elements that appear later in the original set, should be printed first.

so to match 2nd condition first you have to flip the order of recursion call
first not select current element and then in next call select current element

to match 1st condition you have to store all answers in an vector and then sort the vector with compare function

check the Code below