next up previous
Next: Up: Previous:

Examples

Insert(T, 6)



\psfig{figure=figures/f6-8.ps,width=2in,height=2in}

BST Insertion Example

BST Example

For a sequence of integers in the range \(1 \ldots 10\), which insertion order will yield the tallest tree? Inserting in sorted order or reverse sorted order.

Which insertion order will yield the shortest tree? Insert the median first, then the medians of the subarrays, and so on.


next up previous
Next: Up: Previous: