Question: Instead of doubling the size of the array, consider tripling the array every time the array is full.i.e: Initially the array has 1 cell, after

 Instead of doubling the size of the array, consider tripling the
array every time the array is full.i.e: Initially the array has 1
cell, after this is filled up and a new element needs to

Instead of doubling the size of the array, consider tripling the array every time the array is full.i.e: Initially the array has 1 cell, after this is filled up and a new element needs to be inserted, the size will then be expanded to 3. Similarly, after this is filled up and another element needs to be placed, it will now be increased to 9. Assume that each push operation (inserting element) and copy operation (copying element from old array to new array) has a cost of 1 each, what is the approximate average cost of per insertion operation if 81 elements are inserted to the list? (closest to the choices) Select one: a 2.5 b. 15 C. 1 O d. 2 0.3 Assume that each push operation (inserting element) and copy operation (copying element from old array to new array) has a cost of 1 each, what is the approximate average cost of per insertion operation if 82 elements are inserted to the list? (closest to the choices) Select one: a. 1 b.2.5 C.3 d. 2 e. 15 Which of the following graphs best describe the changes in the average cost per insertion? Select one: b. c d

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!