Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement