///////
//
// Student: Russell Lowke
//     T.F: Francis Crick
// Unit Eight, pencil-and-paper - question 4 [worth 2pts],  8/2/2002
//
//  Suppose you have a doubly-linked list in which the prev pointers have not
//  been initialized.  Write a procedure that takes one parameter, a ptr to the head of
//  the list, and traverses the entire list filling in prev pointers. (You can identify
//  the end of the list by the fact that the next field points to the header.)
//


void assignPrev(node* head)
{
	node* ptr = head;
	
	do {
		ptr->prev = ptr;
		ptr = ptr->next;
		
	} while (ptr != head);
}