Skip to content

Instantly share code, notes, and snippets.

@fivetanley
Created March 7, 2012 23:00
Show Gist options
  • Save fivetanley/1996971 to your computer and use it in GitHub Desktop.
Save fivetanley/1996971 to your computer and use it in GitHub Desktop.
Recursive function to find last node before end of LinkedList
Node* LinkedList::getBeforeTail(Node* h)
{
if (!h.next)
{
return 0;
}
if (getBeforeTail(h) == 0)
{
return h;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment