Skip to content

Commit 59be74c

Browse files
committed
Put information about array and set
1 parent 01dba59 commit 59be74c

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

DataStructures/Set/Info.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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

2733
https://en.wikipedia.org/wiki/Set_(abstract_data_type)
2834
https://people.cs.pitt.edu/~milos/courses/cs441/lectures/Class7.pdf
35+
https://leetcode.com/problems/subsets/solution/
284 KB
Loading

Syntaxis/for.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
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])

0 commit comments

Comments
 (0)