Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 21 Online
OpenStudy (anonymous):

PS6#4: Creating subsets Turns out my code broke down when there were duplicates. And I also know about itertools, I just think that defeats the purpose of the class. Anyway, I started from scratch and I think this is a coherent algorithm that correctly generates all subsets. I've also explained the logic the best I could. http://codepad.org/dxNMuin7

OpenStudy (anonymous):

cool - you are expecting a sorted argument? http://codepad.org/g64qPFt7

OpenStudy (anonymous):

yes. I sort the hand before passing it to multiSets.

OpenStudy (anonymous):

Nice! I had an implimentation that was similar to itertools, but it still used some stuff we hadn't seen.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!