Next: Building OABST
Up: Implementation Models and Complexity
Previous: Implementation Model
The time complexity of the algorithm is:
When Phase I is implemented with the model described in Section 3.1.1
,
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) = O(n) + O(n)
S(n) = O(n)
Sashka Davis;961;icsg6;
1999-01-14