CS 371: Module 3: Disjoint Set Data Structures
Module content developed by Professor Tralie. Module engine developed by Professor Tralie and Professor Mongan.
Please watch the two videos below, and click the Next
button to continue when you're finished
Notes
- In python, the boolean expression
val in my_list
will evaluate toTrue
ifval
is an element ofmy_list
, orFalse
otherwise - In addition to lists, there are sets in python, which are declared using curly braces. For instance,
x = {1, 2, 3}
. The elements in sets are in no particular order. You can union one set with another by typingx | y