next up previous contents
Next: Building OABST Up: Implementation Models and Complexity Previous: Implementation Model

Time and Space Complexity of the Hu-Tucker Algorithm

The time complexity of the algorithm is:
$T(n) = T_{Combination} + T_{Level\_Assignment} + T_{Reconstruction}$
When Phase I is implemented with the model described in Section 3.1.1
$T(n) = O(n \lg n) + O(n) + O(n)$
$T(n) = \mathbf{O(n \lg n)}$,
When Phase I is implemented with the model described in Section 3.1.2
T(n) = O(n2) + O(n) + O(n)
T(n) = O(n2),

The space complexity is:
$S(n) = S_{Combination} + S_{Level\_Assignment} + S_{Reconstruction}$
S(n) = O(n) + O(n)
S
(n) = O(n)



Sashka Davis;961;icsg6;
1999-01-14