Name: ________________________________
Honor Code Acknowledgment: ___________________
The call Prepend(list,7) should add a node with 7 as the info
field as the first node of list.
Problem 1: In a fix (2 points)
What is the value of the following postfix expressions?
8 5 + 3 2 * - 7 *
and
22 8 12 7 + * - 10 /
Problem 2: Circle of Friends (2 points)
In a circularly linked list, the last node points at the first node
(instead of at 0). Access to the list is via a pointer to the last
node, since the first node is easy to get to from the last node.
Write a function Prepend that adds a new node as the first node
of a non-empty, circularly linked list. For an extra point deal with
an empty list too.