Answer, and explain: For large lists, which of the following is true of inserting a new item into a linked list compared to insertion in an array? What of small lists?

a) more efficient.
b) less efficient.
c) about the same.
d) depends on the size of the two lists.


a) more efficient. , c) about the same. , and d) depends on the size of the two lists.

Part a) Inserting a new item into a large linked list is more efficient than insertion into a large array. If we are inserting into a list, you have about 5 operations, most of which are pointer assignments, regardless of the list size. If you insert into an array, on the average, you have to move about half the array entries to insert a data item. For small lists, the answer is c) about the same.


Computer Science & Information Technology

You might also like to view...

A group of data items that are connected using pointers is called a(n) ____________.

What will be an ideal response?

Computer Science & Information Technology

Write a statement that declares and creates t.

Consider a two-by-three integer array t.

Computer Science & Information Technology

Identify the letter of the choice that best matches the phrase or definition.

A. Usually reflects the name of the business represented by a website. B. An internal website without public access. C. Technology used to provide faster access to the Internet than a dial-up modem. D. Location of a file in relation to any folders in the website. E. A folder that might store all of the non-HTML files in a website.

Computer Science & Information Technology

An Excel function that adds a group of values and then divides the result by the number of values in the group.

What will be an ideal response?

Computer Science & Information Technology