Linked List Flashcards

(7 cards)

1
Q

Linked list

A

Dynamic data structure used to hold an ordered sequence.

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

Components of a linked list

A

nodes, data field and a pointer

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

Data Field (linked list)

A

contains the value of the actual node

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

Pointer

A

contains the address of the next item in the list.

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

Manipulating a linked list

A

You just edit the pointers and add the value

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

Deleting an element in a linked list

A

Remove the pointer to the node and remove the outgoing pointers.

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

Downsides to linked lists

A

Wastes memory when nodes are ‘deleted’ as they are still there just ignored.

Storing pointers means more memory is required to use a linked list.

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