CS130-lecture-20201123

IMAGE

IMAGE IMAGE IMAGE IMAGE

Quick union example

IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE

index 0 1 2 3 4 5 6 7 8 9
id 1 1 1 8 3 0 5 1 8 8

IMAGE IMAGE IMAGE IMAGE IMAGE

id 0 1 2 3 4
id 1 2 3 4 4

IMAGE

O(n^2) runtime if unioning linear items.

IMAGE

Weighted union example

IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE

id 0 1 2 3 4 5 6 7 8 9
id 6 2 6 4 4 6 6 2 4 4

IMAGE

Screen Shot 2020-11-23 at 6.23.08 PM.png

CORRECTION: 0 should be the root.

IMAGE

Screen Shot 2020-11-23 at 6.33.57 PM.png

CORRECTION: IMAGE

IMAGE