The Department of Computer Science & Engineering
|
|
STUART C. SHAPIRO: CSE
116 B
|
rootval.compareTo(leftval) >
0, and for every value, rightval, in the right subtree,
rootval.compareTo(rightval) < 0. We will assume
that no two values are content equal.
Notice that it's possible to have a badly balanced binary tree:
![]() | ===> | ![]() |
![]() | ===> | ![]() |
![]() | ===> | ![]() |
SeeSimulator by Michael T. Goodrich.
See implementation of BSTree.java.