Advertisement
KoBeWi

Untitled

Dec 10th, 2018
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. void Lista::Reverse() {
  2.     cell* p = header;
  3.     cell* p2 = header->next;
  4.  
  5.     header->next = NULL;
  6.  
  7.     while (p != NULL) {
  8.         cell* p3 = p2->next;
  9.         p2->next = p;
  10.         p = p2;
  11.         p2 = p3;
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement