Unformatted text preview: available in the examples on the course web page /Examples/*. The text code is likely not to run as is on arctic. Also, reuse your previous timing and key generation code. ) Perform the following timing experiments: be sure to identify what computer is used. (a) Build a min heap by inserting elements 1. .N in order and compare the runtime to that of building the AVL trees in HW04. What is the computational effort in each case? (b) Build a min heap by inserting the elements 1. .N in random order and compare the runtime with building the AVL tree as above in (a). (c) For N = 10000, 20000, 40000, compare heapsort with quicksort on these two cases and discuss which is faster. (i) sort an array of data that is already in ascending order (ii) sort an array of data in random order (randomly shuffled)....
View
Full Document
 Spring '08
 M.McCullen
 Algorithms, Data Structures, Binary heap, min heap, min heap operations

Click to edit the document details