CS 371: Disjoint Set Data Structure
Module content developed by Professor Tralie. Module engine developed by Professor Tralie and Professor Mongan.
Wtch the two videos below, which discuss the approaches that people came up with in class for disjoint set. Click the Next button to continue when you're finished
Notes
- In python, the boolean expression
val in my_listwill evaluate toTrueifvalis an element ofmy_list, orFalseotherwise - 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