daily pastebin goal
89%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  void revert(struct node **root) {
  2.      //jednoprvkovy
  3.      if((*root)->next == NULL)
  4.          return;
  5.  
  6.      //dvoj a viac prvkovy
  7.      struct node *act = *root;
  8.      struct node *previous = NULL;
  9.      struct node *nxt;
  10.      while(act->next != NULL) {
  11.          nxt = act->next;
  12.          act->next = previous;
  13.          previous = act;
  14.          act = nxt;
  15.      }
  16.      *root = act;
  17.          
  18.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top