Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.67 KB | None | 0 0
  1. typedef struct node{
  2.     // int data;
  3.     int prio;
  4.     struct node *next;
  5. }NODE;
  6.  
  7. typedef struct queue{
  8.     NODE *head;
  9. }QUEUE;
  10.  
  11.  
  12. // void enqueue_queue_simple(QUEUE *the_queue ,int data)
  13. // {
  14. //  NODE *new_node = creating_node(data);
  15. //  if(is_empty(the_queue))
  16. //  {
  17. //      the_queue -> head = new_node;
  18. //      return;
  19. //  }
  20. //  new_node -> next = the_queue -> head;
  21. //  the_queue -> head = new_node;
  22. // }
  23.  
  24. // void dequeue(QUEUE *the_queue)
  25. // {
  26. //  NODE *aux = the_queue -> head;
  27. //  NODE *prev = NULL;
  28. //  if(is_empty(the_queue))return;
  29. //  while(aux -> next != NULL)
  30. //  {
  31. //      prev = aux;
  32. //      aux = aux -> next;
  33. //  }
  34. //  prev -> next = aux -> next;
  35.  
  36. // }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement