SHARE
TWEET

Untitled

a guest Jun 25th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. typedef struct lligada {
  2.     int value;
  3.     struct lligada *next;
  4. } *LInt;
  5.  
  6.  
  7. void splitQS (LInt l, int x, LInt *mx, LInt *Mx){
  8.     LInt *aux1,*aux2;
  9.     aux1=mx;
  10.     aux2=Mx;
  11.     while(l){
  12.         if(x<l->value){
  13.             (*aux1)=(LInt)malloc(sizeof(struct lligada));
  14.             (*aux1)->value=l->value;
  15.             aux1=&((*aux1)->next);
  16.         }
  17.          if(x>=l->valor){
  18.             (*aux2)=(LInt)malloc(sizeof(struct lligada));
  19.             (*aux2)->value=l->value;
  20.             aux2=&((*aux2)->next);
  21.         }
  22.         l=l->next;
  23.     }
  24. }
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