Linked Lists Flashcards

1
Q

What does a linked data structure consist of?

A

Each item points to another item.

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

Describe a singly linked list.

A

Each item points to the next item.

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

Describe a doubly linked list.

A

Each item points to the next item and to the previous item.

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

What are the advantages of a linked list.

A

Items don’t have to be stored in consecutive memory locations, so we can insert and delete items without shifting data.

Linked lists can grow and shrink dynamically.

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

What’s a node.

A

A linked list is a sequence of items called nodes.

A node in a singly linked list consists of two fields (data and pointer).

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