Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this function should be private to the class, we don't want just anyone calling it
- private:
- // this STILL copies it backwards, but it is recursive this time instead of iterative
- void pHelper(Node * v)
- {
- if(v != nullptr)
- {
- this->addhead(v);
- pHelper(v->next);
- }
- }
Add Comment
Please, Sign In to add comment