Guest User

Untitled

a guest
Jun 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. // this function should be private to the class, we don't want just anyone calling it
  2. private:
  3. // this STILL copies it backwards, but it is recursive this time instead of iterative
  4. void pHelper(Node * v)
  5. {
  6. if(v != nullptr)
  7. {
  8. this->addhead(v);
  9. pHelper(v->next);
  10. }
  11. }
Add Comment
Please, Sign In to add comment