This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 2 ) worst case time complexity. The average case has complexity O(n log n) for practically all distributions. The computational overhead is small as only moving to the left of pivot is costly, moving to the right costs very little (or vice versa dependently if we sort ascending or descending). Hence we have huge time savings in roughly half cases on average. 4.[10] a.[6] Show the heap (complete partially ordered tree) that results if the integers 6,4,7,3,1,9 are inserted into an empty heap. What is the result if DELETEMIN is then applied? b.[4] Show the binary search tree that results if the integers 6,4,7,3,1,9 are inserted into an empty tree. What is the result if DELETEMIN is then applied? a) 1 / \ 3 7 / \ / 6 4 9 After DELETEMIN: 3 / \ 4 7 / \ 6 9...
View Full
Document
 Spring '03
 janicki

Click to edit the document details