Americas
Europe
Q2E
Expert-verifiedBuild a binary search tree for the word’s oenology,phrenology, campanology, ornithology, ichthyology, limnology, alchemy, and astrology using alphabetical order.
The first word is Oenology,make it as the root of the tree. And the second word is Phrenology is greater than oenology so adds as its right child.
The third word is campanology is less than oenology, so add as the left child of oenology.
Now the next word is Ornithology is greater than oenology. but less than phrenology. So, add the left child of phrenology.
The next word is Ichthyology is less than oenology and greater than campanology. So, add as the right child of campanology.
The next word is Limnology is greater than campanology and ichthyology, so added as the right child of ichthyology.
The next word is Alchemy is less than oenology and campanology so will be added as the left child of campanology.
The last word is Astrology is less than oenology and campanology so move towards the left of campanology, but greater than alchemy, so will be added as the right child of alchemy.
Thus, the completed binary tree will look like:
94% of StudySmarter users get better grades.
Sign up for free