#14 linear data structures Flashcards
(7 cards)
1
Q
array advantages
A
> can access element by position
> uses space efficiently
2
Q
array drawbacks
A
> more work to insert or remove form middle or both ends
> more work to grow or shrink
3
Q
linked list advantages
A
> easily inserted and removed
4
Q
linked list drawbacks
A
> indexing is not efficient, requires traversing from head or tail
more memory space
5
Q
AbrstractList is the super class of ?
A
ArrayList and LinkedList
6
Q
linked list variations
A
- doubly linked
- circularly linked
- dummy head
- tail reference
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