emory-courses / dsa-java

Data Structures and Algorithms in Java
https://emory.gitbook.io/dsa-java/
42 stars 55 forks source link

[QZ6] Arrow in tree direction #154

Closed Hodsonj closed 4 years ago

Hodsonj commented 4 years ago

Does the arrow direction mean anything? I've researched other disjoint-set tree visualizations and a lot of them have the arrows going the other way to the "root"?

lujiaying commented 4 years ago

In my mind, the tree maybe is just a dummy example since in disjoint sets, there is no direction between elements. So although existing some arrows, arrows just indicate the source end and target end are connected.

jdchoi77 commented 4 years ago

From a theoretical point of view, the arrows don't mean anything but they mean something for this quiz because it represents which becomes the parent and the child.