Question: char *strings [6] cheetah, jaguar, tiger, leopard, lion, puma) Write out the array after it has been converted into a max heap (that is, every

 char *strings [6] "cheetah", "jaguar", "tiger", "leopard", "lion", "puma") Write out

char *strings [6] "cheetah", "jaguar", "tiger", "leopard", "lion", "puma") Write out the array after it has been converted into a max heap (that is, every parent node is greater than any of its child nodes) using the build_heap algorithm described in the subject. The strings in the array are compared alphabetically. 1.5 4 marks You are given an int array A of size 5 as a hash table, where empty buckets have a value of -1. An int typed key is inserted into the hash table using a hash fune- tion h (key) key * (key + 3) % 5, and collisions are handled by separate chaining with linked lists Write out the hash table after each of the following key values has been inserted into the hash table: 1, 3, 5, 7 (you need to write out a total of 4 hash tables). 1.6 [1 mark] Consider a hash table where the underlying array has a size of n, and the computation of the hash function has a time complexity of 0(1). If separate chaining with linked lists is used to handle collisions, after m key values have been inserted into the hash table, what is the worst-case time complexity in big-O notation (in terms of the number of key comparisons) of searching for a key value from this hash table

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!