Construct list algorithms using object references.


Teaching Note:

Lists will be restricted to singly linked types. Methods that should be known are add (head and tail), insert (in order), delete, list, isEmpty, isFull.


Sample Question:


JSR Notes:

The animation is great; and you can view a video commentary of it at this link. Definitely use the animation too, though, since you can take yourself through it, at your own pace, one step at a time.

2175     notes  Stacks (implement by a linked list)                                             
2177      code   
2180 animation  (From the List section above.)


2182     notes  Queues (implement by a linked list) (same as Stacks notes above)                 
2185 code

Do make sure you remember the importance if isEmpty() when trying to pop or dequeue, and isFull() when pushing or enqueueing.