Store the array representations of the given 3-ary max-heap after each specified operation into 2d array output, located within the method heapOperations. You'll be storing the array representation at the ith series of operations at row 1-1. Variable output has 12 columns, given that the maximum number of elements under the series of operations is 12. If the array representation after an operation is less than 12, you pad O's at the end. (See Q2 for more details) Note that each operation should be performed on the result of the previous operation. Original 85 71 74 59 65 70 37 26 35 55 Operation 1: After removing the top twice (Store at index 0) 36 Operation 2: After inserting 15 and 100 (Store at index 1) Operation 3: After removing the top once (Store at index 2) Operation 4: After inserting 72 and 88 (Store at index 3) Operation 5: After removing the top 5 times (Store at index 4)

icon
Related questions
Question
Store the array representations of the given 3-ary max-heap after each
specified operation into 2d array output, located within the method
heapOperations. You'll be storing the array representation at the ith series of
operations at row 1-1. Variable output has 12 columns, given that the
maximum number of elements under the series of operations is 12. If the array
representation after an operation is less than 12, you pad O's at the end. (See Q2
for more details)
Note that each operation should be performed on the result of the previous
operation.
Original
85 71 74 59 65 70 37 26 35 55
Operation 1: After removing the top twice (Store at index 0)
36
Operation 2: After inserting 15 and 100 (Store at index 1)
Operation 3: After removing the top once (Store at index 2)
Operation 4: After inserting 72 and 88 (Store at index 3)
Operation 5: After removing the top 5 times (Store at index 4)
Transcribed Image Text:Store the array representations of the given 3-ary max-heap after each specified operation into 2d array output, located within the method heapOperations. You'll be storing the array representation at the ith series of operations at row 1-1. Variable output has 12 columns, given that the maximum number of elements under the series of operations is 12. If the array representation after an operation is less than 12, you pad O's at the end. (See Q2 for more details) Note that each operation should be performed on the result of the previous operation. Original 85 71 74 59 65 70 37 26 35 55 Operation 1: After removing the top twice (Store at index 0) 36 Operation 2: After inserting 15 and 100 (Store at index 1) Operation 3: After removing the top once (Store at index 2) Operation 4: After inserting 72 and 88 (Store at index 3) Operation 5: After removing the top 5 times (Store at index 4)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer