///////
//
// Student: Russell Lowke
//     T.F: Francis Crick
// Unit Eight, pencil-and-paper - question 3 [worth 2pts],  8/2/2002
//
//
// Describe an iterative (non-recursive) function that reverses the order of
// the nodes in a singly-linked list.  Use the same nodes as the ones in the
// original list.
//

Set a temp var to the list head
Loop through each node in the list.
For each node, save the position of its next ptr, then assign said ptr to the previous node.
In the case of the first node, set its next ptr to NULL
If at the end of the list, set the head pointer to that node, otherwise proceed
to the next node.

i.e.


temp = head;

while (temp != NULL) {
	
	// save the next ptr about to be changed
	saved = temp->next;
	
	// set the next nodes 'next' to here
	temp->next = temp;
	
	// check if this was the first node
	if (temp->next == head) {
		// if so, assign as the end (NULL)
		temp->next = NULL;
	}
	
	if (saved == NULL) {
		// set the end of list to the beginning
		head = temp;
	}
	
	// go to next node along
	temp = saved;
	
}