Name: ________________________________ Section: _________________
Honor Code Acknowledgment: ___________________
Due: November 2
struct Node
{
int info;
Node * next;
Node(int value, Node * follow = 0)
{
info = value;
next = follow;
}
};
void Prepend(Node * list, int value)
// precondition: list points to last node of NON-empty circularly-linked list
// (first node is list->next)
// postcondition: new first node with info == value added to
// the circularly-linked list whose last node is list
void RemoveLast(Node * & list)
// precondition: list points to last node of NON-empty circularly-linked list
// (first node is list->next)
// postcondition: last node is removed (returned to heap) and list
// points to the new last node