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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment