size
data member, so they are
not exactly LinkedList
objects.
Type Function(parameters)
{
// Do special things...
// Call second function, passing head of list
Function(head, parameters);
// Do more special things...
}
Type Function(LinkedListNode* node, parameters)
{
if (condition)
{
// Handle non-recursive case...
}
else
{
// Handle recursive case...
return Function(node->next, parameters);
}
}
recurlinkedlist.h
This page was last modified on Apr 6, 2001
URL: http://people.hsc.edu/faculty-staff/robbk/Coms262/Lectures/RecursiveLinkedLists.html