DIS_Quiz3 Flashcards

1
Q

Linked lists remove requirement that list elements be stored in consecutive memory locations.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Linked lists have direct access to each element of the list

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Insertion is not possible at the beginning of a linked list

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Given the linked list above, what is the value first->next->data?

A

17

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Adding an element to the end of an array-based list is easier (requires less operation) than linked lists.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The array-based implementation of a list works well for lists with many insertions and deletions.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Since default assignment operator makes a shallow copy, assignment operator should be overloaded for a deep copy when there is dynamically allocated data members in a class.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A linked list with 100 elements uses more memory than an array-based list with a capacity of 100 elements.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the following does not require shifting during insertion or deletion?

A

Linked List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which of the following accepts the capacity of the list as a parameter of the constructor (e.g., List aList (500))?

A

List with Dynamic Array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly