I have an assignment to show a brute force algorithm on combination and permutations. All I am given is the function headers, and I cannot see the main. I'm having trouble understanding how sets work...
Here is my header function for combination
set< set<char> > powerSet(set<char S>)
now, I'm not really sure where to start here. I kind of know how to do the algorithm for combination (essentially if the input was 1,2,3,4,5 it would print out every combination of that), but how do I iterate through sets?
how do I define the first and last parts of the set? Like this?
(type?) i = S.begin()
sorry if this post seems confusing.. I'm not really sure of it myself :D