Describe how we can use a heap to sort a list of numbers. Whatis the worst case runtime
of your procedure?
How can we use a binary search tree to sort efficiently? What isthe worst case runtime
of your procedure?
Answer
`Hey,
Note: Brother in case of any queries, just comment inbox I would be very happy to assist all your queries
Heap sort is a comparison based sorting technique based onBinary Heap data structure. It is similar to selection sort wherewe first find the maximum element and place the maximum element atthe end. We repeat the same process for remaining element.
Time Complexity: Time complexity
OR
OR