(a)
(b)
(c)
for all w, z (elements of) S.
for all w, z (elements of) S such that w <> z.
i.e., determine any two numbers that are at least as close together as the average distance between consecutive numbers in the sorted order.
where size(x) and height[x] denote the number of nodes and height, respectively, of the tree rooted at x.
![]() |
![]() |
|---|