nguyentruong98

Untitled

Dec 29th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. void pushQueue(Queue *q, int vertices)
  2. {
  3.       if (q->head == NULL)
  4.       {
  5.             q->head->value = vertices;
  6.             return;
  7.       }
  8.       q->head->value = vertices;
  9.       while (q->head != NULL)
  10.       {
  11.             q->head = q->head->next;
  12.       }
  13.       q->head->next->value = vertices;
  14.       return;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment