Question: *) In the makeRoom method of an array-based implementation of the ADT list, if a new entry is to be placed at numberOfEntries + 1:

*) In the makeRoom method of an array-based implementation of the ADT list, if a new entry is to be placed at numberOfEntries + 1:

a) It is impossible to add at "numberOfEntries + 1" and it will show an error b) the removeGap method should be used c) moving each entry to its next higher position is necessary d) moving each entry to its next higher position is not necessary e) none of the above

*) In an array-based implementation of the ADT list, the performance is O(n) when?

a) removing an entry from the beginning of the list b) removing an entry from the end of the list c) adding an entry at the end of the list when the array is not resized d) adding an entry at the end of the list when the array is resized e) 1 & 4 f) all of them g) none of them

*) In an array-based implementation of the ADT list, the worst-case performance is O(1) when:

a) the replace method for the entry at the beginning b) the replace method for the entry at the end c) the replace method for the entry in the middle d) All of them e) None of them

*) Adding a node at position n+1 of a chain of n nodes is the same as :

a) adding a node before the last node of a chain of n nodes b) replacing a node with the last node of a chain of n nodes c) adding a node after the last node of a chain of n nodes d) none of them. It is impossible to add a node at position n+1 of a linked list.

*) Adding a node at position n of a chain of n nodes is the same as

a) adding a node before the last node of a chain of n nodes b) replacing a node with the last node of a chain of n nodes c) adding a node after the last node of a chain of n nodes d) none of them. It is impossible to add a node at position n+1 of a linked list.

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!