data-structures-linked-lists Flashcards

1
Q

How are linked lists different from an array?

A

linked list have linear access whereas arrays have random access

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

How would you access an arbitrary node in a linked list (not just the “head”)?

A

loops

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

Time complexity of linked list.

A

O(n), the more inputs the more iterations (more iterations = steps x n). longer list = more steps

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