Draw the 24 arrows from the 24 permutations of the letters
in {a, b, c, d} to the 14 different binary search trees.
The domain permutations and codomain
4 node binary search tree shapes are shown here.
Here is where the solution will be to check your work
against for mapping a permutation
to a binary search tree. The arrows are:
-
GREEN arrows for
the best case performance trees which average 2.0 probes per search,
- BLUE arrows for the medium performance
trees which average 2.25 probes per search, and
-
RED arrows for the slowest, worst
performance trees.
These RED trees are the most unbalanced and the tallest trees.
They average 2.5 probes per search.