CP164 Lecture Notes - Lecture 13: Circular Buffer, Linked Data, Linear Search
Document Summary
Have something that points to rear of a queue ( similar to circular queue) Front and back are references to actual node that are the front and the rear. Need a seperate class that keeps up with stack node. When queue is initialized everything set to none and size set to 0. At top level of linked queue we will know what the front and rear is. _size similar to _count from circular queue. Both front and rear have to be updated to point to same thing when you add first. Create node its next points to none and add to rear of queue. Rear next ow points to second new node ( break connection with old rear) If we keep adding things to rear. As long as no one is pointing to node it will eventually go away (don"t have to remove) If we can to get rid of front update to new fron.