Merging Two Leftist Heaps
merge(T1,T2) returns one leftist heap containing all elements of the two (distinct) leftist heaps T1 and T2
a
L1
R1
b
L2
R2
merge
T1
T2
a < b
a
L1
merge
b
L2
R2
R1
Previous slide
Next slide
Back to first slide
View graphic version