



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




b) [16 pts] Fill in the array for the heap that results given the following heap and the commands that follow: 1 13 15 21 24 19 22 Add 5 Remove Remove Add 21 c) [8 pts] In assignment 5, the word lists are implemented using a Binary Search Tree. Compare that approach (i.e., the Binary Search Tree) against storing them in an ArrayList which is searched using Binary Search. State one pro (reason why the Binary Search Tree is a better approach) and one con (reason why the Binary Search Tree is a worse approach). PROS CONS
d) [8 pts] Pick one of the data structures that can be used to implement a map (as listed in class). Name the underlying data structure that you have selected and fill out the following table of worst case Big-O values for the computation of the three operations and for the space required. Operation Data Structure Space Add Search Remove