Question
4 Easy Quiz Questions Question 1: Below are the contents of the id array for the quick-find version of the Union-Find algorithm. 0,4,7,0,4,4,4,7,8,0 The contents
4 Easy Quiz Questions
Question 1:
Below are the contents of the id array for the quick-find version of the Union-Find algorithm. 0,4,7,0,4,4,4,7,8,0 The contents are listed in order from slot 0 to slot 9. (So for example, id[1] is 4 and id[2] is 7. What are the contents of the id array after the call union(5, 3)? Use the same format as above (a comma-separated listing of the contents without spaces).
_____________________
Question 2 Below are the contents of the id array and the size array for the weighted quick-union version of the Union-Find algorithm. id: 0,4,7,0,4,4,5,7,8,0 size: 3,1,1,1,4,2,1,2,1,1 The contents are listed in order from slot 0 to slot 9. (So for example, id[1] is 4 and id[2] is 7 and size[0] is 3. What are the contents of the id array after the call union(5, 3)? Use the same format as above (a comma-separated listing of the contents without any spaces).
_____________________
Question 3 (25 points) Below are the contents of pq [] that stores the items in a heap for a max priority queue. (There are currently 9 items in the priority queue, but the array itself is bigger) -,100,19,36,17,3,25,1,2,7 The items are listed in the order they appear in the array. Remember that slot 0 of the array is not used. List out the contents of the heap (the first 11 slots in the pq array, including the - for slot 0) after inserting 27. List out the contents in the same format as above, a comma-separated list of numbers (except for a - in slot 0) with no spaces.
_____________________
Question 4 Below are the contents of pq array that stores the items in a heap for a max priority queue. (There are currently 9 items in the priority queue, but the array itself is bigger) -,100,19,36,17,3,25,1,2,7 The items are listed in the order they appear in the array. Remember that slot 0 of the array is not used. List out the contents of the heap (the first 9 slots in the pq array, including the - for slot 0) after deleteMax is called. List out the contents in the same format as above, a comma-separated list of numbers (except for a - in slot 0) with no spaces.
_____________________
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started