File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,14 @@ Unordered collection data type with no duplicate elements
2222- ** Cardinality of the Cartesian product** : |S x T| = |S| \* |T|
2323- ** Disjoint sets** : Two sets are called disjoint if their intersection is empty.
2424
25+ ## Algorithms:
26+
27+ - ** Power Set**
28+
29+ ![ ] ( /Imgs/DataStructures/Set/powerset.png )
30+
2531## References
2632
2733https://en.wikipedia.org/wiki/Set_(abstract_data_type)
2834https://people.cs.pitt.edu/~milos/courses/cs441/lectures/Class7.pdf
35+ https://leetcode.com/problems/subsets/solution/
Original file line number Diff line number Diff line change 1+ # When you're trying to access and modify the elements in the current array
2+ # you need to use: "range" instead of "in"
3+ power_set = [[]]
4+ for i in range (len (power_set )):
5+ power_set .append (power_set [i ] + [0 ])
You can’t perform that action at this time.
0 commit comments