|
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Linear
Linked list...
|
|
private:
|
|
node * head;
|
|
node * tail; //???helpful? no!
|
|
| • |
So,
Where is the “top”?
|
|
|
|
– |
if
the top is at the “tail”, what would the implication of
|
|
|
push
and pop be? Push would be fine if a tail pointer
|
|
|
were
provided...but Pop would be disastrous, requiring
|
|
traversal!!
|
|
|
|
– |
if
the top is at the “head”, push and pop are essentially
|
|
|
“direct
access”, no traversals needed!
|
|
|
|