Linked Lists Flashcards

1
Q

What are Linked Lists?

A

provides dynamism that a simple array lacks, allowing efficient insertion and deletion

elements (nodes) are linked using pointers

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

What do Nodes contain?

A

data - actual value
pointer / reference - points to the next node (NULL if last node)

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

Types of Linked Lists

A

Singly Linked List - nodes have a single pointer pointing to the next node

Doubly Linked List - nodes have two pointers, one pointing to the next node and one to the previous node

Circular Linked List - last node points back to the first node

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

What is the time complexity of traversing Linked Lists?

A

O(n) - linear

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

What kind of item is a Linked List item?

A

structured item that’s self referential

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

What happens if an item

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