nguyentruong98

Untitled

Dec 9th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1.  while (q->head != NULL)
  2.       {
  3.             int v = frontQueue(q);
  4.             popQueue(q);
  5.             if(v == end)
  6.             break;
  7.             visitedarray[v] = 1;
  8.             for (int i = 1; i <= n; i++)
  9.             {
  10.                   if (map[v][i] && !visitedarray[i])
  11.                         pushQueue(i);
  12.             }
  13.       }
Advertisement
Add Comment
Please, Sign In to add comment