#14  linear data structures Flashcards

1
Q

array advantages

A

> can access element by position

> uses space efficiently

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

array drawbacks

A

> more work to insert or remove form middle or both ends

> more work to grow or shrink

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

linked list advantages

A

> easily inserted and removed

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

linked list drawbacks

A

> indexing is not efficient, requires traversing from head or tail
more memory space

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

AbrstractList is the super class of ?

A

ArrayList and LinkedList

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

linked list variations

A
  1. doubly linked
  2. circularly linked
  3. dummy head
  4. tail reference
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

dummy head technique

A

> dummy head (head is either the 1st node or a empty dummy node)
head is never null (even in empty list
head is never changes from the dummy

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