 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
The
“brute force” technique is to create an array of
|
|
|
pointers
to your data by traversing an unbalanced
|
|
|
|
BST
using “inorder” traversal
|
|
|
|
– |
then
re-build the tree by splitting the array in the middle
|
|
|
|
for
each subarray (much like what we have seen with
|
|
|
|
the
binary search algorithm used with arrays)
|
|
|
|
– |
the
middle data item should be the root, as it splits what
|
|
|
|
is
less than it, and what is greater!
|
|