View difference between Paste ID: 6LWhH8Mg and uvcU4SVw
SHOW: | | - or go back to the newest paste.
1
Node* find_last(Node* n)
2
{
3
  Node* last{n};
4
  if(last->next != nullptr)
5
  {
6
    return find_last(last->next);
7
  }
8
  return last;
9
}