Merging Height Biased Leftist Trees
Merging two nodes together depends on whether the tree is a min or max height biased leftist tree. For a min height biased leftist tree, set the higher valued node as its right child of the lower valued node. If the lower valued node already has a right child, then merge the higher valued node with the sub-tree rooted by the right child of the lower valued node.
After merging, the s-value of the lower valued node must be updated (see above section, s-value). Now check if the lower valued node has a left child. If it does not, then move the right child to the left. If it does have a left child, then the child with the highest s-value should go on the left.
Read more about this topic: Leftist Tree
Famous quotes containing the words merging, height, biased and/or trees:
“You hear a lot of dialogue on the death of the American family. Families arent dying. Theyre merging into big conglomerates.”
—Erma Bombeck (b. 1927)
“The height of cleverness is being able to conceal it.”
—François, Duc De La Rochefoucauld (16131680)
“Scientists are humantheyre as biased as any other group. But they do have one great advantage in that science is a self-correcting process.”
—Cyril Ponnamperuma (b. 1923)
“One wonders that the tithing-men and fathers of the town are not out to see what the trees mean by their high colors and exuberance of spirits, fearing that some mischief is brewing. I do not see what the Puritans did at this season, when the maples blaze out in scarlet. They certainly could not have worshiped in groves then. Perhaps that is what they built meeting-houses and fenced them round with horse-sheds for.”
—Henry David Thoreau (18171862)