Jan 24, 2009

Sort the array representation of a complete binary search tree in O(n) time complexity and by using constant space.

Sort the array representation of a complete binary search tree in O(n) time complexity and by using constant space.
The array is partially sorted by the length of 2^n(n>=0), so a merge sort can do this in O(n) time and O(n) space

No comments:

Post a Comment