If an ADT list is implemented as an array, why would it be necessary for the ADT operations to “shift” elements?

What will be an ideal response?


When we want to insert a value in between two existing values in the array, all the entries to the right of the new value need to be shifted to the right by one position to make room. Analogously, when we remove an element from the interior of an array, we don’t want to leave a blank, so we shift left by one position those elements to the right of where we just deleted.

Computer Science & Information Technology

You might also like to view...

By default, the Search Companion searches through a folder and its ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

The statement cin >> *p;

A) stores the keyboard input into the variable p. B) stores the keyboard input into the pointer called p. C) is illegal in C++. D) stores the keyboard input into the variable pointed to by p. E) None of the above

Computer Science & Information Technology

When the user selects an item in a List Box, the item is stored in the List Box’s ____________ property.

a. Checked b. Selected Value c. Data Selection d. Selected Item

Computer Science & Information Technology

The ________ view is the default view in Word 2010

A) Outline B) Draft C) Print Layout D) Full Screen Reading

Computer Science & Information Technology