Repeat Exercise R-14.28 for Figures 14.22 through 14.24 that illustrate
Kruskal’s algorithm.
George claims he has a fast way to do path compression in a partition
structure, starting at a positionp. He putspinto a listL, and starts following
parent pointers. Each time he encounters a new position,q, he addsq
toLand updates the parent pointer of each node inLto point toq’s parent.
Show that George’s algorithm runs in Ω(h2) time on a path of lengthh.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here